projects
/
openvswitch
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7449352
)
lockfile: Fix inverted comparison.
author
Ben Pfaff
<blp@nicira.com>
Wed, 11 Mar 2009 21:33:32 +0000
(14:33 -0700)
committer
Ben Pfaff
<blp@nicira.com>
Wed, 11 Mar 2009 21:44:57 +0000
(14:44 -0700)
remove_lockfile() returns a negative errno value on error, 0 on success.
Minor style fix also.
lib/lockfile.c
patch
|
blob
|
history
diff --git
a/lib/lockfile.c
b/lib/lockfile.c
index d98e97a5ae8f3ad6c8bf0a907c7081ede69ad7bd..031f2453c9914f578ecb9c3abfbd6bc69eae8305 100644
(file)
--- 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;
}