Re: [PATCH v3 16/25] commit_lock_file(): die() if called for unlocked lockfile object

2014-04-16 Thread Michael Haggerty
On 04/15/2014 08:49 AM, Johannes Sixt wrote: Am 4/14/2014 15:54, schrieb Michael Haggerty: diff --git a/lockfile.c b/lockfile.c index 664b0c3..1453a7a 100644 --- a/lockfile.c +++ b/lockfile.c @@ -292,6 +292,9 @@ int commit_lock_file(struct lock_file *lk) if (lk-fd = 0

Re: [PATCH v3 16/25] commit_lock_file(): die() if called for unlocked lockfile object

2014-04-15 Thread Johannes Sixt
Am 4/14/2014 15:54, schrieb Michael Haggerty: diff --git a/lockfile.c b/lockfile.c index 664b0c3..1453a7a 100644 --- a/lockfile.c +++ b/lockfile.c @@ -292,6 +292,9 @@ int commit_lock_file(struct lock_file *lk) if (lk-fd = 0 close_lock_file(lk)) return -1; + if

[PATCH v3 16/25] commit_lock_file(): die() if called for unlocked lockfile object

2014-04-14 Thread Michael Haggerty
It was previously a bug to call commit_lock_file() with a lock_file object that was not active (an illegal access would happen within the function). It was presumably never done, but this would be an easy programming error to overlook. So before continuing, do a consistency check that the