diff --git a/c_src/oid.c b/c_src/oid.c index 00ff35a..a0cf889 100644 --- a/c_src/oid.c +++ b/c_src/oid.c @@ -6,10 +6,8 @@ int geef_oid_bin(ErlNifBinary *bin, const git_oid *id) { - if (!enif_alloc_binary(GIT_OID_RAWSZ, bin)) { - printf("cannot alloc an id!\n"); + if (!enif_alloc_binary(GIT_OID_RAWSZ, bin)) return -1; - } memcpy(bin->data, id, GIT_OID_RAWSZ); return 0;