re_intuit_start(): give "other" block it's own 's'
authorDavid Mitchell <davem@iabyn.com>
Tue, 4 Feb 2014 19:08:40 +0000 (19:08 +0000)
committerDavid Mitchell <davem@iabyn.com>
Sat, 8 Feb 2014 13:50:11 +0000 (13:50 +0000)
There's an 's' var global to the whole function; but give the "other
substr" code block its own local 's' var, since its only used as a tmp
var, not to pass values to or from the block. Eventually we'll remove the
global 's' altogether.

regexec.c

index c717338..82b174f 100644 (file)
--- a/regexec.c
+++ b/regexec.c
@@ -916,6 +916,7 @@ Perl_re_intuit_start(pTHX_
       do_other_substr:
        {
             char *last, *last1;
+            char *s;
             SV* must;
             struct reg_substr_datum *other = &prog->substrs->data[other_ix];
 
@@ -1288,7 +1289,6 @@ Perl_re_intuit_start(pTHX_
                if (t + start_shift >= check_at) /* Contradicts floating=check */
                    goto retry_floating_check;
                /* Recheck anchored substring, but not floating... */
-               s = check_at;
                if (!check)
                    goto giveup;
                DEBUG_EXECUTE_r( PerlIO_printf(Perl_debug_log,