summaryrefslogtreecommitdiff
path: root/support/regcomp.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2017-06-22 22:14:49 +0300
committerArnold D. Robbins <arnold@skeeve.com>2017-06-22 22:14:49 +0300
commita702a6b6d6009068f4608a865bdd06a07259cf67 (patch)
treed585379df26577cf83ed1c11ea66d6e6bae41362 /support/regcomp.c
parent0ac746db72a0879bbd44325fe15b3ae33c63ecef (diff)
downloadgawk-a702a6b6d6009068f4608a865bdd06a07259cf67.tar.gz
Update regex routines from GLIBC.
Diffstat (limited to 'support/regcomp.c')
-rw-r--r--support/regcomp.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/support/regcomp.c b/support/regcomp.c
index 5ac53701..c45e91fc 100644
--- a/support/regcomp.c
+++ b/support/regcomp.c
@@ -1,5 +1,5 @@
/* Extended regular expression matching and search library.
- Copyright (C) 2002-2016 Free Software Foundation, Inc.
+ Copyright (C) 2002-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
@@ -961,8 +961,9 @@ static void
internal_function
init_word_char (re_dfa_t *dfa)
{
- int i, j, ch;
dfa->word_ops_used = 1;
+ int i = 0;
+ int ch = 0;
#ifndef GAWK
if (BE (dfa->map_notascii == 0, 1))
{
@@ -996,8 +997,8 @@ init_word_char (re_dfa_t *dfa)
}
#endif
- for (i = 0, ch = 0; i < BITSET_WORDS; ++i)
- for (j = 0; j < BITSET_WORD_BITS; ++j, ++ch)
+ for (; i < BITSET_WORDS; ++i)
+ for (int j = 0; j < BITSET_WORD_BITS; ++j, ++ch)
if (isalnum (ch) || ch == '_')
dfa->word_char[i] |= (bitset_word_t) 1 << j;
}