From: Paul Eggert Date: Tue, 10 Jan 2017 04:26:02 +0000 (-0800) Subject: dfa: omit unnecessary allocation X-Git-Tag: v1.0~6394 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=7fbe8c090a39cd3ad168db8d0878f2df10bcb249;p=gnulib.git dfa: omit unnecessary allocation * lib/dfa.c (dfaanalyze): Do not allocate follow set, since an all-zero follow set works just fine. --- diff --git a/ChangeLog b/ChangeLog index f0cd277302..beeefb7f3d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2017-01-09 Paul Eggert + dfa: omit unnecessary allocation + * lib/dfa.c (dfaanalyze): Do not allocate follow set, since + an all-zero follow set works just fine. + dfa: omit unused local * lib/dfa.c (build_state): Fix up recent change. diff --git a/lib/dfa.c b/lib/dfa.c index e8cb6bb4e7..b27bef484c 100644 --- a/lib/dfa.c +++ b/lib/dfa.c @@ -2501,8 +2501,6 @@ dfaanalyze (struct dfa *d, bool searchflag) firstpos->index = lastpos->index = i; firstpos->constraint = lastpos->constraint = NO_CONSTRAINT; - /* Allocate the follow set for this position. */ - alloc_position_set (&d->follows[i], 1); break; } #ifdef DEBUG