commit - 04c53c18246515277f8f093309035e992273819d
commit + d3dccf3ae48d930b4dc4de823864e5026d9ca93d
blob - 506a18dece417978b0b5c833aa9365cdf7a218a1
blob + c12ff83d5cf6d42fbf518538d88f280e74224af7
--- libexec/got-fetch-pack/got-fetch-pack.c
+++ libexec/got-fetch-pack/got-fetch-pack.c
const struct got_error *err = NULL;
SHA1_CTX ctx;
uint8_t hexpect[SHA1_DIGEST_LENGTH];
- char s1[SHA1_DIGEST_STRING_LENGTH + 1];
- char s2[SHA1_DIGEST_STRING_LENGTH + 1];
uint8_t buf[32 * 1024];
ssize_t n, r, nr;
return err;
if (r != sizeof(hexpect))
return got_error(GOT_ERR_BAD_PACKFILE);
- if (memcmp(hcomp, hexpect, SHA1_DIGEST_LENGTH) != 0) {
- got_sha1_digest_to_str(hcomp, s1, sizeof(s1));
- got_sha1_digest_to_str(hexpect, s2, sizeof(s2));
+ if (memcmp(hcomp, hexpect, SHA1_DIGEST_LENGTH) != 0)
return got_error(GOT_ERR_BAD_PACKFILE);
- }
return NULL;
}