[BACK]Return to readline.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / lib / libedit

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/lib/libedit/readline.c between version 1.49.2.2 and 1.49.2.3

version 1.49.2.2, 2005/05/28 14:03:25 version 1.49.2.3, 2005/07/12 11:33:40
Line 1550  filename_completion_function(const char 
Line 1550  filename_completion_function(const char 
 char *  char *
 username_completion_function(const char *text, int state)  username_completion_function(const char *text, int state)
 {  {
         struct passwd *pwd;          struct passwd *pwd, pwres;
           char pwbuf[1024];
   
         if (text[0] == '\0')          if (text[0] == '\0')
                 return (NULL);                  return (NULL);
Line 1561  username_completion_function(const char 
Line 1562  username_completion_function(const char 
         if (state == 0)          if (state == 0)
                 setpwent();                  setpwent();
   
         while ((pwd = getpwent()) && text[0] == pwd->pw_name[0]          while (getpwent_r(&pwres, pwbuf, sizeof(pwbuf), &pwd) == 0
               && text[0] == pwd->pw_name[0]
             && strcmp(text, pwd->pw_name) == 0);              && strcmp(text, pwd->pw_name) == 0);
   
         if (pwd == NULL) {          if (pwd == NULL) {

Legend:
Removed from v.1.49.2.2  
changed lines
  Added in v.1.49.2.3

CVSweb <webmaster@jp.NetBSD.org>