X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=pack-check.c;fp=pack-check.c;h=3a62e1b7e40927390e10ae63943596a367ecbf47;hb=13941d158a5f53456cc095b1a4893c177c7224c0;hp=e57587909e54d9317a18e3bfd43559562a40f0d5;hpb=471838c5e32b83bc8b84584343daeb1174d0e968;p=git.git diff --git a/pack-check.c b/pack-check.c index e5758790..3a62e1b7 100644 --- a/pack-check.c +++ b/pack-check.c @@ -29,10 +29,10 @@ static int verify_packfile(struct packed_git *p) pack_base = p->pack_base; SHA1_Update(&ctx, pack_base, pack_size - 20); SHA1_Final(sha1, &ctx); - if (memcmp(sha1, pack_base + pack_size - 20, 20)) + if (memcmp(sha1, (char *) pack_base + pack_size - 20, 20)) return error("Packfile %s SHA1 mismatch with itself", p->pack_name); - if (memcmp(sha1, index_base + index_size - 40, 20)) + if (memcmp(sha1, (char *) index_base + index_size - 40, 20)) return error("Packfile %s SHA1 mismatch with idx", p->pack_name); @@ -135,7 +135,7 @@ int verify_pack(struct packed_git *p, int verbose) SHA1_Init(&ctx); SHA1_Update(&ctx, index_base, index_size - 20); SHA1_Final(sha1, &ctx); - if (memcmp(sha1, index_base + index_size - 20, 20)) + if (memcmp(sha1, (char *) index_base + index_size - 20, 20)) ret = error("Packfile index for %s SHA1 mismatch", p->pack_name);