[BACK]Return to stringlist.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ftp

Diff for /src/usr.bin/ftp/stringlist.c between version 1.1 and 1.2

version 1.1, 1997/02/03 01:05:44 version 1.2, 1997/07/25 21:56:23
Line 53 
Line 53 
 {  {
         StringList *sl = malloc(sizeof(StringList));          StringList *sl = malloc(sizeof(StringList));
         if (sl == NULL)          if (sl == NULL)
                 _err(1, "stringlist: %m");                  err(1, "stringlist: %m");
   
         sl->sl_cur = 0;          sl->sl_cur = 0;
         sl->sl_max = _SL_CHUNKSIZE;          sl->sl_max = _SL_CHUNKSIZE;
         sl->sl_str = malloc(sl->sl_max * sizeof(char *));          sl->sl_str = malloc(sl->sl_max * sizeof(char *));
         if (sl->sl_str == NULL)          if (sl->sl_str == NULL)
                 _err(1, "stringlist: %m");                  err(1, "stringlist: %m");
         return sl;          return sl;
 }  }
   
Line 76 
Line 76 
                 sl->sl_max += _SL_CHUNKSIZE;                  sl->sl_max += _SL_CHUNKSIZE;
                 sl->sl_str = realloc(sl->sl_str, sl->sl_max * sizeof(char *));                  sl->sl_str = realloc(sl->sl_str, sl->sl_max * sizeof(char *));
                 if (sl->sl_str == NULL)                  if (sl->sl_str == NULL)
                         _err(1, "stringlist: %m");                          err(1, "stringlist: %m");
         }          }
         sl->sl_str[sl->sl_cur++] = name;          sl->sl_str[sl->sl_cur++] = name;
 }  }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2