Просмотр исходного кода

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

Manuel Novoa III 24 лет назад
Родитель
Сommit
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 char line_buff[PWD_BUFFER_SIZE];
     static struct passwd pwd;
     static struct passwd pwd;
-    LOCK;
+
     if (getpwent_r(&pwd, line_buff, sizeof(line_buff), NULL) != -1) {
     if (getpwent_r(&pwd, line_buff, sizeof(line_buff), NULL) != -1) {
-	UNLOCK;
 	return &pwd;
 	return &pwd;
     }
     }
-    UNLOCK;
     return NULL;
     return NULL;
 }
 }