[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.108 and 1.109

version 1.108, 2013/05/28 00:10:34 version 1.109, 2013/08/28 08:05:21
Line 236  static const char *
Line 236  static const char *
 _default_history_file(void)  _default_history_file(void)
 {  {
         struct passwd *p;          struct passwd *p;
         static char path[PATH_MAX];          static char *path;
           size_t len;
         if (*path)          if (path)
                 return path;                  return path;
         if ((p = getpwuid(getuid())) == NULL)          if ((p = getpwuid(getuid())) == NULL)
                 return NULL;                  return NULL;
         (void)snprintf(path, sizeof(path), "%s/.history", p->pw_dir);  
           len = strlen(p->pw_dir) + sizeof("/.history");
           if ((path = malloc(len)) == NULL)
                   return NULL;
           (void)snprintf(path, len, "%s/.history", p->pw_dir);
         return path;          return path;
 }  }

Removed from v.1.108  
changed lines
  Added in v.1.109

CVSweb <webmaster@jp.NetBSD.org>