convert "oidcmp() != 0" to "!oideq()"
[gitweb.git] / pack-objects.c
index f00a025738d49cf7eef8f3561efe75de3abadbd8..2bc762699770d80a55d80a0231c04040973558cd 100644 (file)
@@ -16,7 +16,7 @@ static uint32_t locate_object_entry_hash(struct packing_data *pdata,
        while (pdata->index[i] > 0) {
                uint32_t pos = pdata->index[i] - 1;
 
-               if (!hashcmp(sha1, pdata->objects[pos].idx.oid.hash)) {
+               if (hasheq(sha1, pdata->objects[pos].idx.oid.hash)) {
                        *found = 1;
                        return i;
                }
@@ -60,7 +60,7 @@ static void rehash_objects(struct packing_data *pdata)
                                                       &found);
 
                if (found)
-                       die("BUG: Duplicate object in hash");
+                       BUG("Duplicate object in hash");
 
                pdata->index[ix] = i + 1;
                entry++;