|
@@ -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;
|
|
|
}
|
|
|
|
|
|
|