Re: [PATCH v5 05/35] rollback_lock_file(): set fd to -1
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Sep 16, 2014, 20:38 UTC
- Message-ID
- <20140916203852.GE29050@google.com>
- In-Reply-To
- <1410896036-12750-6-git-send-email-mhagger@alum.mit.edu>
Michael Haggerty wrote:
Show 8 quoted lines
> --- a/lockfile.c > +++ b/lockfile.c > @@ -276,7 +276,7 @@ void rollback_lock_file(struct lock_file *lk) > return; > > if (lk->fd >= 0) > - close(lk->fd); > + close_lock_file(lk);
Doesn't need to be guarded by the 'if'.