hold_locked_index(): move from lockfile.c to read-cache.c
[gitweb.git] / fast-import.c
index 487f1f81ac170acf87bae2801f6472c0768e3e24..783c6840b5962d82ccce05f20dd921f67ab6006a 100644 (file)
@@ -878,7 +878,7 @@ static void start_packfile(void)
        pack_size = sizeof(hdr);
        object_count = 0;
 
-       all_packs = xrealloc(all_packs, sizeof(*all_packs) * (pack_id + 1));
+       REALLOC_ARRAY(all_packs, pack_id + 1);
        all_packs[pack_id] = p;
 }
 
@@ -1832,10 +1832,8 @@ static void dump_marks(void)
        }
 
        if (commit_lock_file(&mark_lock)) {
-               int saved_errno = errno;
-               rollback_lock_file(&mark_lock);
                failure |= error("Unable to commit marks file %s: %s",
-                       export_marks_file, strerror(saved_errno));
+                       export_marks_file, strerror(errno));
                return;
        }
 }