mirror of
https://github.com/git/git
synced 2024-08-25 02:35:46 +00:00
rollback_lock_file(): do not clear filename redundantly
It is only necessary to clear the lock_file's filename field if it was not already clear. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Reviewed-by: Ronnie Sahlberg <sahlberg@google.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
419f0c0f68
commit
5527d5349b
|
@ -280,6 +280,6 @@ void rollback_lock_file(struct lock_file *lk)
|
|||
if (lk->fd >= 0)
|
||||
close(lk->fd);
|
||||
unlink_or_warn(lk->filename);
|
||||
lk->filename[0] = 0;
|
||||
}
|
||||
lk->filename[0] = 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue