소스 검색

Remove recursive lock/unlock for a non-recursive mutex.

Manuel Novoa III 23 년 전
부모
커밋
43b3eaffd9
1개의 변경된 파일1개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 3
      libc/pwd_grp/pwent.c

+ 1 - 3
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;
 }