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

Diff for /src/usr.bin/mail/cmd3.c between version 1.26 and 1.27

version 1.26, 2015/01/20 16:59:07 version 1.27, 2015/10/16 17:56:07
Line 478 
Line 478 
         gname = *argv;          gname = *argv;
         h = hash(gname);          h = hash(gname);
         if ((gh = findgroup(gname)) == NULL) {          if ((gh = findgroup(gname)) == NULL) {
                 if ((gh = (struct grouphead *)calloc(1, sizeof(*gh))) == NULL)                  if ((gh = calloc(1, sizeof(*gh))) == NULL)
                         errx(1, "Out of memory");                          err(1, "calloc");
                 gh->g_name = vcopy(gname);                  gh->g_name = vcopy(gname);
                 gh->g_list = NULL;                  gh->g_list = NULL;
                 gh->g_link = groups[h];                  gh->g_link = groups[h];
Line 493 
Line 493 
          */           */
   
         for (ap = argv+1; *ap != NULL; ap++) {          for (ap = argv+1; *ap != NULL; ap++) {
                 if ((gp = (struct group *)calloc(1, sizeof(*gp))) == NULL)                  if ((gp = calloc(1, sizeof(*gp))) == NULL)
                         errx(1, "Out of memory");                          err(1, "calloc");
                 gp->ge_name = vcopy(*ap);                  gp->ge_name = vcopy(*ap);
                 gp->ge_link = gh->g_list;                  gp->ge_link = gh->g_list;
                 gh->g_list = gp;                  gh->g_list = gp;
Line 725 
Line 725 
         }          }
         if (altnames != 0)          if (altnames != 0)
                 (void)free(altnames);                  (void)free(altnames);
         if ((altnames = (char **)calloc(c, sizeof(char *))) == NULL)          if ((altnames = calloc(c, sizeof(char *))) == NULL)
                 errx(1, "Out of memory");                  err(1, "calloc");
         for (ap = namelist, ap2 = altnames; *ap; ap++, ap2++) {          for (ap = namelist, ap2 = altnames; *ap; ap++, ap2++) {
                 if ((*ap2 = strdup(*ap)) == NULL)                  if ((*ap2 = strdup(*ap)) == NULL)
                         errx(1, "Out of memory");                          err(1, "strdup");
         }          }
         *ap2 = 0;          *ap2 = 0;
         return(0);          return(0);

Legend:
Removed from v.1.26  
changed lines
  Added in v.1.27