From d72dac96e1e6fba8153b5c38c698b0fe487b939f Mon Sep 17 00:00:00 2001 From: Steve Bennett Date: Tue, 14 Jun 2011 10:42:55 +1000 Subject: Minor code cleanups Some unused variables Signed-off-by: Steve Bennett --- jimregexp.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'jimregexp.c') diff --git a/jimregexp.c b/jimregexp.c index 141db92..b138cb1 100644 --- a/jimregexp.c +++ b/jimregexp.c @@ -1269,14 +1269,11 @@ static int regmatchsimplerepeat(regex_t *preg, int scan, int matchmin) static int regmatchrepeat(regex_t *preg, int scan, int matchmin) { - const char *save; int *scanpt = preg->program + scan; int max = scanpt[2]; int min = scanpt[3]; - save = preg->reginput; - /* Have we reached min? */ if (scanpt[4] < min) { /* No, so get another one */ @@ -1305,7 +1302,6 @@ static int regmatchrepeat(regex_t *preg, int scan, int matchmin) return 0; } /* maximal, so try this branch again */ - save = preg->reginput; if (scanpt[4] < max) { scanpt[4]++; if (regmatch(preg, scan + 5)) { @@ -1313,10 +1309,8 @@ static int regmatchrepeat(regex_t *preg, int scan, int matchmin) } scanpt[4]--; } - /* At this point we are at max with no match. Back up by one and try the other branch */ - preg->reginput = save; - int ret = regmatch(preg, regnext(preg, scan)); - return ret; + /* At this point we are at max with no match. Try the other branch */ + return regmatch(preg, regnext(preg, scan)); } /* -- cgit v1.1