diff options
author | Sergei Golubchik <sergii@pisem.net> | 2011-07-02 22:08:51 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2011-07-02 22:08:51 +0200 |
commit | 9809f05199aeb0b67991fac41bd86f38730768dc (patch) | |
tree | fa2792ff86d0da014b535d743759810612338042 /cmd-line-utils/readline/complete.c | |
parent | 0accbd0364e0333e0b119aa9ce93e34ded9df6cb (diff) | |
parent | 5a0e7394a5ae0c7b6a1ea35b7ea3a8985325987a (diff) | |
download | mariadb-git-9809f05199aeb0b67991fac41bd86f38730768dc.tar.gz |
5.5-merge
Diffstat (limited to 'cmd-line-utils/readline/complete.c')
-rw-r--r-- | cmd-line-utils/readline/complete.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/cmd-line-utils/readline/complete.c b/cmd-line-utils/readline/complete.c index 2745e4e4801..d11ea2493a6 100644 --- a/cmd-line-utils/readline/complete.c +++ b/cmd-line-utils/readline/complete.c @@ -1839,8 +1839,11 @@ rl_username_completion_function (text, state) #else /* !__WIN32__ && !__OPENNT) */ static char *username = (char *)NULL; static struct passwd *entry; - static int namelen, first_char, first_char_loc; + static int first_char, first_char_loc; char *value; +#if defined (HAVE_GETPWENT) + static int namelen; +#endif if (state == 0) { @@ -1850,7 +1853,9 @@ rl_username_completion_function (text, state) first_char_loc = first_char == '~'; username = savestring (&text[first_char_loc]); +#if defined (HAVE_GETPWENT) namelen = strlen (username); +#endif setpwent (); } |