[BACK]Return to parse.y CVS log [TXT][DIR] Up to [local] / src / usr.bin / doas

Diff for /src/usr.bin/doas/parse.y between version 1.5 and 1.6

version 1.5, 2015/07/19 22:09:08 version 1.6, 2015/07/19 22:11:41
Line 77 
Line 77 
                                         maxrules = 63;                                          maxrules = 63;
                                 else                                  else
                                         maxrules *= 2;                                          maxrules *= 2;
                                 if (!(rules = reallocarray(rules, maxrules, sizeof(*rules))))                                  if (!(rules = reallocarray(rules, maxrules,
                                       sizeof(*rules))))
                                         errx(1, "can't allocate rules");                                          errx(1, "can't allocate rules");
                         }                          }
                         rules[nrules++] = r;                          rules[nrules++] = r;
Line 116 
Line 117 
                                 errx(1, "can't allocate envlist");                                  errx(1, "can't allocate envlist");
                 } | envlist TSTRING {                  } | envlist TSTRING {
                         int nenv = arraylen($1.envlist);                          int nenv = arraylen($1.envlist);
                         if (!($$.envlist = reallocarray($1.envlist, nenv + 2, sizeof(char *))))                          if (!($$.envlist = reallocarray($1.envlist, nenv + 2,
                               sizeof(char *))))
                                 errx(1, "can't allocate envlist");                                  errx(1, "can't allocate envlist");
                         $$.envlist[nenv] = $2.str;                          $$.envlist[nenv] = $2.str;
                         $$.envlist[nenv + 1] = NULL;                          $$.envlist[nenv + 1] = NULL;
Line 180 
Line 182 
                         next = getc(yyfp);                          next = getc(yyfp);
                         if (next == '\n')                          if (next == '\n')
                                 goto repeat;                                  goto repeat;
                         else                          else
                                 c = next;                                  c = next;
                 case '\n':                  case '\n':
                 case '{':                  case '{':

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6