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:

committed by
Junio C Hamano

parent
d6cf61bfd4
commit
4ed7cd3ab0
@ -738,7 +738,7 @@ int cmd_update_index(int argc, const char **argv, const char *prefix)
|
||||
get_index_file(), strerror(lock_error));
|
||||
}
|
||||
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");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user