Commit Diff


commit - 7f959095d870780b8583469cb15673aba6164da2
commit + a755a22cd4eca6783f283b88d3734fc2ce087bb7
blob - c5a389ba424f515e20c4b3afb8f183a6b2cdd9ae
blob + 0f7e7ecca20145a10ab4146b77499313ccdd89ed
--- libexec/got-read-blob/got-read-blob.c
+++ libexec/got-read-blob/got-read-blob.c
@@ -171,7 +171,7 @@ main(int argc, char *argv[])
 				goto done;
 		}
 		SHA1Final(id.sha1, &sha1_ctx);
-		if (memcmp(expected_id.sha1, id.sha1, SHA1_DIGEST_LENGTH) != 0) {
+		if (got_object_id_cmp(&expected_id, &id) != 0) {
 			char buf[SHA1_DIGEST_STRING_LENGTH];
 			err = got_error_fmt(GOT_ERR_OBJ_CSUM,
 			    "checksum failure for object %s",