Improve use of lockfile API

Remove remaining double close(2)'s.  i.e. close() before
commit_locked_index() or commit_lock_file().

Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Brandon Casey
2008-01-16 13:12:46 -06:00
committed by Junio C Hamano
parent d6cf61bfd4
commit 4ed7cd3ab0
20 changed files with 54 additions and 45 deletions

View File

@ -283,7 +283,7 @@ int cmd_read_tree(int argc, const char **argv, const char *unused_prefix)
}
if (write_cache(newfd, active_cache, active_nr) ||
close(newfd) || commit_locked_index(&lock_file))
commit_locked_index(&lock_file))
die("unable to write new index file");
return 0;
}