summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libc/pwd_grp/pwent.c4
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;
}