]> Savannah Git Hosting - gnulib.git/commitdiff
dfa: omit unnecessary allocation
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 10 Jan 2017 04:26:02 +0000 (20:26 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 10 Jan 2017 10:13:13 +0000 (02:13 -0800)
* lib/dfa.c (dfaanalyze): Do not allocate follow set, since
an all-zero follow set works just fine.

ChangeLog
lib/dfa.c

index f0cd277302e08807d796ac792718a694fb20ef1d..beeefb7f3d2cfb76a27c0ab4e612c5cb3209ae68 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2017-01-09  Paul Eggert  <eggert@cs.ucla.edu>
 
+       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.
 
index e8cb6bb4e71f2d2769c66bfc99ac2cf2f4bdbd46..b27bef484c92c372eff072192e7946e70134c419 100644 (file)
--- 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