Commit Diff


commit - 1ba62ba45b6de8e8b3a55cc4a3b84c69ab7f0fdc
commit + 28d1e31ec4a08d25cc98f69caa627207de484a7f
blob - d9566112a5b3e08d6cf30203e0f015242553d858
blob + 5fa0499e9e024bcf6a7a8371640bb25e6032e5c5
--- libexec/got-read-blob/got-read-blob.c
+++ libexec/got-read-blob/got-read-blob.c
@@ -183,7 +183,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",