From 43b3eaffd907f6a66476fe605698ee3bdd5280bc Mon Sep 17 00:00:00 2001 From: Manuel Novoa III Date: Sun, 18 Aug 2002 00:21:45 +0000 Subject: Remove recursive lock/unlock for a non-recursive mutex. --- libc/pwd_grp/pwent.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'libc/pwd_grp') 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; } -- cgit v1.2.3