aboutsummaryrefslogtreecommitdiffstats
path: root/lock.c
diff options
context:
space:
mode:
authorMatthias Andree <matthias.andree@gmx.de>2021-08-26 23:53:14 +0200
committerMatthias Andree <matthias.andree@gmx.de>2021-08-26 23:53:14 +0200
commit9ef9cd28d92980b266196925784ab43bb812a839 (patch)
treef72a87da26c9f1f52665bb15cf325444bb8e6bfb /lock.c
parentf5644ba244b0db009e07eb6a94cae8c7d9846a79 (diff)
downloadfetchmail-9ef9cd28d92980b266196925784ab43bb812a839.tar.gz
fetchmail-9ef9cd28d92980b266196925784ab43bb812a839.tar.bz2
fetchmail-9ef9cd28d92980b266196925784ab43bb812a839.zip
lock.c: fix unused-value warning in unlockit().
Diffstat (limited to 'lock.c')
-rw-r--r--lock.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/lock.c b/lock.c
index 5f452b36..57676f89 100644
--- a/lock.c
+++ b/lock.c
@@ -59,8 +59,11 @@ 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)) {
+ (void)truncate(lockfile, (off_t)0);
+ }
+ }
}
void fm_lock_dispose(void)