X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=fsck-objects.c;h=4ddd67699cfefccee34caa38f2334789ef43dbfc;hb=962554c616e30991553c8497ed1e7c2a415fa84d;hp=9950be264501a5c99eafe7c2438b27b857ba6402;hpb=36b5b3c65948694d9a92de5a17f2b97c3cd84879;p=git.git diff --git a/fsck-objects.c b/fsck-objects.c index 9950be26..4ddd6769 100644 --- a/fsck-objects.c +++ b/fsck-objects.c @@ -20,7 +20,7 @@ static int check_strict = 0; static int keep_cache_objects = 0; static unsigned char head_sha1[20]; -#if NO_D_INO_IN_DIRENT +#ifdef NO_D_INO_IN_DIRENT #define SORT_DIRENT 0 #define DIRENT_SORT_HINT(de) 0 #else @@ -61,9 +61,12 @@ static void check_connectivity(void) int i; /* Look up all the requirements, warn about missing objects.. */ - for (i = 0; i < nr_objs; i++) { + for (i = 0; i < obj_allocs; i++) { struct object *obj = objs[i]; + if (!obj) + continue; + if (!obj->parsed) { if (!standalone && has_sha1_file(obj->sha1)) ; /* it is in pack */