X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=fsck-cache.c;h=bb5cf196af7f06a3aea6fcfc5941565110c94b27;hb=29d76d4b05bc537ac59fd1e6f849ab3386c01502;hp=5dca6dbc04b0bf40cd654f05766f7daa6fac75b4;hpb=8ba0bbb237af3de317f8d009302500e9a7e2b3c3;p=git.git diff --git a/fsck-cache.c b/fsck-cache.c index 5dca6dbc..bb5cf196 100644 --- a/fsck-cache.c +++ b/fsck-cache.c @@ -69,6 +69,7 @@ static void check_connectivity(void) if (lookup_seen(n->needs, n->tag)) continue; strcpy(hex, sha1_to_hex(n->parent)); + printf("missing %s: %s referenced by %s\n", n->tag, sha1_to_hex(n->needs), hex); } /* Tell the user about things not referenced.. */ @@ -105,7 +106,7 @@ static int mark_sha1_seen(unsigned char *sha1, char *tag) seen = realloc(seen, alloc_seen*sizeof(struct seen)); } s = seen + nr_seen; - memset(s, 0, sizeof(s)); + memset(s, 0, sizeof(*s)); nr_seen++; memcpy(s->sha1, sha1, 20); strncpy(s->tag, tag, sizeof(s->tag));