[git commit future 1/1] lckpwdf.c: add back lost return
Khem Raj
raj.khem at gmail.com
Sat Mar 19 18:51:25 UTC 2011
commit: http://git.uclibc.org/uClibc/commit/?id=6045a6be0a172206a7068f8e086c7d2967bee505
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/future
2 earlier (2006 and 2009) commits killed the proper return: -1 for failure, 0 on success
Signed-off-by: Peter S. Mazinger <ps.m at gmx.net>
---
libc/pwd_grp/lckpwdf.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/libc/pwd_grp/lckpwdf.c b/libc/pwd_grp/lckpwdf.c
index adbc616..3c54495 100644
--- a/libc/pwd_grp/lckpwdf.c
+++ b/libc/pwd_grp/lckpwdf.c
@@ -51,6 +51,7 @@ lckpwdf (void)
struct sigaction new_act; /* New signal action. */
struct flock fl; /* Information struct for locking. */
int result;
+ int rv = -1;
if (lock_fd != -1)
/* Still locked by own process. */
@@ -111,11 +112,13 @@ lckpwdf (void)
if (result < 0) {
close(lock_fd);
lock_fd = -1;
+ goto DONE;
}
+ rv = 0;
DONE:
__UCLIBC_MUTEX_UNLOCK(mylock);
- return 0; /* TODO: return result? */
+ return rv;
}
--
1.7.3.4
More information about the uClibc-cvs
mailing list