X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/5092aba5a75e23dc8bca281a5ea240a7e155eff3..2cec70b9f139dd207022c35fdbe8b49fd1cf230d:/src/print.c diff --git a/src/print.c b/src/print.c index e1f53a1e..b9c518f7 100644 --- a/src/print.c +++ b/src/print.c @@ -124,16 +124,13 @@ print_errs (FILE *out, state_t *state) errs *errp = state->errs; int i; - if (!errp) - return; - for (i = 0; i < errp->nerrs; ++i) if (errp->errs[i]) fprintf (out, _(" %-4s\terror (nonassociative)\n"), tags[errp->errs[i]]); if (i > 0) - fputc ('\n', out); + fputc ('\n', out); } @@ -192,10 +189,9 @@ print_reductions (FILE *out, state_t *state) SETBIT (shiftset, SHIFT_SYMBOL (shiftp, i)); } - if (errp) - for (i = 0; i < errp->nerrs; i++) - if (errp->errs[i]) - SETBIT (shiftset, errp->errs[i]); + for (i = 0; i < errp->nerrs; i++) + if (errp->errs[i]) + SETBIT (shiftset, errp->errs[i]); if (state->nlookaheads == 1 && !nodefault) {