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

Diff for /src/usr.bin/sed/compile.c between version 1.39 and 1.40

version 1.39, 2015/10/26 14:08:47 version 1.40, 2015/10/26 22:24:44
Line 784 
Line 784 
                                 break;                                  break;
                         }                          }
                         if ((cp->u.c = findlabel(cp->t)) == NULL)                          if ((cp->u.c = findlabel(cp->t)) == NULL)
                                 error(COMPILE2, "undefined label '%s'", cp->t);                                  error(COMPILE, "undefined label '%s'", cp->t);
                         free(cp->t);                          free(cp->t);
                         break;                          break;
                 case '{':                  case '{':
Line 809 
Line 809 
         lhp = &labels[h & LHMASK];          lhp = &labels[h & LHMASK];
         for (lh = *lhp; lh != NULL; lh = lh->lh_next)          for (lh = *lhp; lh != NULL; lh = lh->lh_next)
                 if (lh->lh_hash == h && strcmp(cp->t, lh->lh_cmd->t) == 0)                  if (lh->lh_hash == h && strcmp(cp->t, lh->lh_cmd->t) == 0)
                         error(COMPILE2, "duplicate label '%s'", cp->t);                          error(COMPILE, "duplicate label '%s'", cp->t);
         lh = xmalloc(sizeof *lh);          lh = xmalloc(sizeof *lh);
         lh->lh_next = *lhp;          lh->lh_next = *lhp;
         lh->lh_hash = h;          lh->lh_hash = h;

Legend:
Removed from v.1.39  
changed lines
  Added in v.1.40