diff --git a/lib/libedit/src/readline.c b/lib/libedit/src/readline.c index fd25c0164..70ff6b03d 100644 --- a/lib/libedit/src/readline.c +++ b/lib/libedit/src/readline.c @@ -1784,11 +1784,7 @@ username_completion_function(const char *text, int state) setpwent(); 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 -#endif && text[0] == pass->pw_name[0] && strcmp(text, pass->pw_name) == 0) continue;