Makefile: Set USE_PIC on x86-64
[gitweb.git] / fsck-objects.c
index 2b1aab488f2b8d64fa799adf427b6eeca35ac757..ef54a8a411b01bb4f6becd24c68fad3fcbd15211 100644 (file)
@@ -60,11 +60,13 @@ static int objwarning(struct object *obj, const char *err, ...)
 
 static void check_connectivity(void)
 {
-       int i;
+       int i, max;
 
        /* Look up all the requirements, warn about missing objects.. */
-       for (i = 0; i < obj_allocs; i++) {
-               struct object *obj = objs[i];
+       max = get_max_object_index();
+       for (i = 0; i < max; i++) {
+               const struct object_refs *refs;
+               struct object *obj = get_indexed_object(i);
 
                if (!obj)
                        continue;
@@ -78,8 +80,8 @@ static void check_connectivity(void)
                        continue;
                }
 
-               if (obj->refs) {
-                       const struct object_refs *refs = obj->refs;
+               refs = lookup_object_refs(obj);
+               if (refs) {
                        unsigned j;
                        for (j = 0; j < refs->count; j++) {
                                struct object *ref = refs->ref[j];