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
@ -108,7 +108,6 @@ static int update_index_refresh(int fd, struct lock_file *index_lock)
|
||||
return error("Could not read index");
|
||||
result = refresh_cache(0) ? 1 : 0;
|
||||
if (write_cache(fd, active_cache, active_nr) ||
|
||||
close(fd) ||
|
||||
commit_locked_index(index_lock))
|
||||
return error ("Could not refresh index");
|
||||
return result;
|
||||
|
Reference in New Issue
Block a user