From: Ben Pfaff Date: Wed, 11 Mar 2009 21:33:32 +0000 (-0700) Subject: lockfile: Fix inverted comparison. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=29f015cc3f1f29949e4150fbe5be0fa060977b6a;p=openvswitch lockfile: Fix inverted comparison. remove_lockfile() returns a negative errno value on error, 0 on success. Minor style fix also. --- 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; }