Restore unconditional use of getpwent vs. non-POSIX getpwent_r

This commit is contained in:
Viktor Dukhovni
2016-11-14 01:00:50 -05:00
parent 77ff7185d7
commit eeeb216451

View File

@@ -1784,11 +1784,7 @@ username_completion_function(const char *text, int state)
setpwent(); setpwent();
while ( while (
#if defined(HAVE_GETPW_R_POSIX) || defined(HAVE_GETPW_R_DRAFT)
getpwent_r(&pwres, pwbuf, sizeof(pwbuf), &pass) == 0 && pass != NULL
#else
(pass = getpwent()) != NULL (pass = getpwent()) != NULL
#endif
&& text[0] == pass->pw_name[0] && text[0] == pass->pw_name[0]
&& strcmp(text, pass->pw_name) == 0) && strcmp(text, pass->pw_name) == 0)
continue; continue;