diff options
Diffstat (limited to 'lock.c')
-rw-r--r-- | lock.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -59,8 +59,12 @@ void fm_lock_setup(struct runctl *ctl) static void unlockit(void) /* must-do actions for exit (but we can't count on being able to do malloc) */ { - if (lockfile && lock_acquired) - unlink(lockfile) && truncate(lockfile, (off_t)0); + if (lockfile && lock_acquired) { + if (unlink(lockfile)) { + int dummy = truncate(lockfile, (off_t)0); + (void)dummy; + } + } } void fm_lock_dispose(void) |