[PATCH v5 16/35] commit_lock_file(): inline temporary variable

2014-09-16 Thread Michael Haggerty
Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- lockfile.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lockfile.c b/lockfile.c index 1c85b18..9e1cdd2 100644 --- a/lockfile.c +++ b/lockfile.c @@ -311,12 +311,14 @@ int reopen_lock_file(struct lock_file *lk)

Re: [PATCH v5 16/35] commit_lock_file(): inline temporary variable

2014-09-16 Thread Jonathan Nieder
Michael Haggerty wrote: --- a/lockfile.c +++ b/lockfile.c @@ -311,12 +311,14 @@ int reopen_lock_file(struct lock_file *lk) int commit_lock_file(struct lock_file *lk) { char result_file[PATH_MAX]; - size_t i; + if (lk-fd = 0 close_lock_file(lk)) return