diff options
author | Manuel Novoa III <mjn3@codepoet.org> | 2002-08-18 00:21:45 +0000 |
---|---|---|
committer | Manuel Novoa III <mjn3@codepoet.org> | 2002-08-18 00:21:45 +0000 |
commit | 43b3eaffd907f6a66476fe605698ee3bdd5280bc (patch) | |
tree | f4dc12bce2c3cfbbc81c73cb56da89d169aa6645 | |
parent | a7cce5b0efc3bf416695d95567c648269ac5433c (diff) |
Remove recursive lock/unlock for a non-recursive mutex.
-rw-r--r-- | libc/pwd_grp/pwent.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libc/pwd_grp/pwent.c b/libc/pwd_grp/pwent.c index 1bc129bf6..f79be7f33 100644 --- a/libc/pwd_grp/pwent.c +++ b/libc/pwd_grp/pwent.c @@ -80,12 +80,10 @@ struct passwd *getpwent(void) { static char line_buff[PWD_BUFFER_SIZE]; static struct passwd pwd; - LOCK; + if (getpwent_r(&pwd, line_buff, sizeof(line_buff), NULL) != -1) { - UNLOCK; return &pwd; } - UNLOCK; return NULL; } |