re_intuit_start(): eliminate s as func-wide var
authorDavid Mitchell <davem@iabyn.com>
Wed, 5 Feb 2014 11:51:58 +0000 (11:51 +0000)
committerDavid Mitchell <davem@iabyn.com>
Sat, 8 Feb 2014 13:50:23 +0000 (13:50 +0000)
All uses of s are now as tmp values local to a specific block,
so make it just local to the block.

regexec.c

index 035d5de..b65cdea 100644 (file)
--- a/regexec.c
+++ b/regexec.c
@@ -638,7 +638,6 @@ Perl_re_intuit_start(pTHX_
     SSize_t start_shift = 0;
     /* Should be nonnegative! */
     SSize_t end_shift   = 0;
-    char *s;
     /* current lowest pos in string where the regex can start matching */
     char *rx_origin = strpos;
     SV *check;
@@ -1224,7 +1223,7 @@ Perl_re_intuit_start(pTHX_
                         : STR_LEN(progi->regstclass))
                    : 1);
        char * endpos;
-        s = rx_origin;
+        char *s = rx_origin;
        if (prog->anchored_substr || prog->anchored_utf8 || ml_anch)
             endpos= HOP3c(s, (prog->minlen ? cl_l : 0), strend);
         else if (prog->float_substr || prog->float_utf8)