diff options
Diffstat (limited to 'regex')
-rw-r--r-- | regex/Makefile.am | 3 | ||||
-rw-r--r-- | regex/engine.c | 17 | ||||
-rw-r--r-- | regex/regcomp.c | 7 |
3 files changed, 10 insertions, 17 deletions
diff --git a/regex/Makefile.am b/regex/Makefile.am index e2304ff7309..0fd62a777f6 100644 --- a/regex/Makefile.am +++ b/regex/Makefile.am @@ -31,6 +31,3 @@ test: re tests ./re < tests ./re -el < tests ./re -er < tests - -# Don't update the files from bitkeeper -%::SCCS/s.% diff --git a/regex/engine.c b/regex/engine.c index a099cfb891d..5db8df210bd 100644 --- a/regex/engine.c +++ b/regex/engine.c @@ -256,7 +256,6 @@ sopno stopst; register const char *ssp; /* start of string matched by subsubRE */ register const char *sep; /* end of string matched by subsubRE */ register const char *oldssp; /* previous ssp */ - register const char *dp; /* used in debug mode to check asserts */ AT("diss", start, stop, startst, stopst); sp = start; @@ -314,11 +313,9 @@ sopno stopst; ssub = ss + 1; esub = es - 1; /* did innards match? */ - if (slow(charset, m, sp, rest, ssub, esub) != NULL) { - dp = dissect(charset, m, sp, rest, ssub, esub); - assert(dp == rest); - } else /* no */ - assert(sp == rest); + if (slow(charset, m, sp, rest, ssub, esub) != NULL) + sp = dissect(charset, m, sp, rest, ssub, esub); + assert(sp == rest); sp = rest; break; case OPLUS_: @@ -353,8 +350,8 @@ sopno stopst; } assert(sep == rest); /* must exhaust substring */ assert(slow(charset, m, ssp, sep, ssub, esub) == rest); - dp = dissect(charset, m, ssp, sep, ssub, esub); - assert(dp == sep); + sp = dissect(charset, m, ssp, sep, ssub, esub); + assert(sp == sep); sp = rest; break; case OCH_: @@ -388,8 +385,8 @@ sopno stopst; else assert(OP(m->g->strip[esub]) == O_CH); } - dp = dissect(charset, m, sp, rest, ssub, esub); - assert(dp == rest); + sp = dissect(charset, m, sp, rest, ssub, esub); + assert(sp == rest); sp = rest; break; case O_PLUS: diff --git a/regex/regcomp.c b/regex/regcomp.c index b203d4941e1..81c435ed552 100644 --- a/regex/regcomp.c +++ b/regex/regcomp.c @@ -690,7 +690,6 @@ register cset *cs; case '-': SETERROR(REG_ERANGE); return; /* NOTE RETURN */ - break; default: c = '\0'; break; @@ -1564,13 +1563,13 @@ struct parse *p; register struct re_guts *g; { register sop *scan; - sop *start; - register sop *newstart; + sop *UNINIT_VAR(start); + register sop *UNINIT_VAR(newstart); register sopno newlen; register sop s; register char *cp; register sopno i; - LINT_INIT(start); LINT_INIT(newstart); + /* avoid making error situations worse */ if (p->error != 0) return; |