From 29f015cc3f1f29949e4150fbe5be0fa060977b6a Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 11 Mar 2009 14:33:32 -0700 Subject: [PATCH] lockfile: Fix inverted comparison. remove_lockfile() returns a negative errno value on error, 0 on success. Minor style fix also. --- lib/lockfile.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/lockfile.c b/lib/lockfile.c index d98e97a5..031f2453 100644 --- a/lib/lockfile.c +++ b/lib/lockfile.c @@ -111,11 +111,12 @@ create_lockfile(const char *name) struct passwd *pwd; mode_t old_umask; uid_t uid; + int retval; int fd; /* Remove an existing lockfile if it was created by us. */ - int retval = remove_lockfile(name); - if (!retval) { + retval = remove_lockfile(name); + if (retval) { return retval; } -- 2.30.2