From: Paul Eggert Date: Tue, 10 Jan 2017 09:27:44 +0000 (-0800) Subject: dfa: minor simplification with emptyset X-Git-Tag: v1.0~6391 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=836ac768dbbc444c887d1742ff869521ec3b7b5c;p=gnulib.git dfa: minor simplification with emptyset * lib/dfa.c (build_state): Simplify by using emptyset. --- diff --git a/ChangeLog b/ChangeLog index e0b73b50be..8fda2938db 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2017-01-10 Paul Eggert + + dfa: minor simplification with emptyset + * lib/dfa.c (build_state): Simplify by using emptyset. + 2017-01-09 Paul Eggert dfa: shrink constraints from 4 bits to 3 diff --git a/lib/dfa.c b/lib/dfa.c index 28678c2327..5df27eae09 100644 --- a/lib/dfa.c +++ b/lib/dfa.c @@ -2760,10 +2760,7 @@ build_state (state_num s, struct dfa *d, unsigned char uc) matches.w[j] &= d->syntax.letters.w[j] | d->syntax.newline.w[j]; /* If there are no characters left, there's no point in going on. */ - size_t j; - for (j = 0; j < CHARCLASS_WORDS && !matches.w[j]; j++) - continue; - if (j == CHARCLASS_WORDS) + if (emptyset (&matches)) continue; /* If we have reset the bit that made us declare "matched", reset