浏览代码

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