convert "hashcmp() != 0" to "!hasheq()"
This rounds out the previous three patches, covering the inequality logic for the "hash" variant of the functions. As with the previous three, the accompanying code changes are the mechanical result of applying the coccinelle patch; see those patches for more discussion. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
9001dc2a74
commit
67947c34ae
@ -543,7 +543,7 @@ static int fetch_object(struct walker *walker, unsigned char *sha1)
|
||||
} else if (req->zret != Z_STREAM_END) {
|
||||
walker->corrupt_object_found++;
|
||||
ret = error("File %s (%s) corrupt", hex, req->url);
|
||||
} else if (hashcmp(obj_req->oid.hash, req->real_sha1)) {
|
||||
} else if (!hasheq(obj_req->oid.hash, req->real_sha1)) {
|
||||
ret = error("File %s has bad hash", hex);
|
||||
} else if (req->rename < 0) {
|
||||
struct strbuf buf = STRBUF_INIT;
|
||||
|
Reference in New Issue
Block a user