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

Diff for /src/usr.bin/mail/vars.c between version 1.12 and 1.13

version 1.12, 2009/10/27 23:59:40 version 1.13, 2015/10/16 17:56:07
Line 51 
Line 51 
         h = hash(name);          h = hash(name);
         vp = lookup(name);          vp = lookup(name);
         if (vp == NULL) {          if (vp == NULL) {
                 if ((vp = (struct var *)calloc(1, sizeof(*vp))) == NULL)                  if ((vp = calloc(1, sizeof(*vp))) == NULL)
                         errx(1, "Out of memory");                          err(1, "calloc");
                 vp->v_name = vcopy(name);                  vp->v_name = vcopy(name);
                 vp->v_link = variables[h];                  vp->v_link = variables[h];
                 variables[h] = vp;                  variables[h] = vp;
Line 87 
Line 87 
         if (*str == '\0')          if (*str == '\0')
                 return("");                  return("");
         if ((new = strdup(str)) == NULL)          if ((new = strdup(str)) == NULL)
                 errx(1, "Out of memory");                  err(1, "strdup");
         return(new);          return(new);
 }  }
   

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13