From: Jarkko Hietaniemi Date: Thu, 13 Apr 2006 15:39:33 +0000 (+0300) Subject: regexec.c: (Coverity) move NULL check even earlier X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2757e526e6581a1ca50cec2e6e969471038f97d2;p=p5sagit%2Fp5-mst-13.2.git regexec.c: (Coverity) move NULL check even earlier Message-Id: <200604131239.k3DCdXhe124107@kosh.hut.fi> Date: Thu, 13 Apr 2006 15:39:33 +0300 (EEST) p4raw-id: //depot/perl@27788 --- diff --git a/regexec.c b/regexec.c index 459002a..399410f 100644 --- a/regexec.c +++ b/regexec.c @@ -1605,10 +1605,10 @@ Perl_regexec_flags(pTHX_ register regexp *prog, char *stringarg, register char * char *scream_olds = NULL; SV* oreplsv = GvSV(PL_replgv); const bool do_utf8 = DO_UTF8(sv); - const I32 multiline = prog->reganch & PMf_MULTILINE; + I32 multiline; #ifdef DEBUGGING - SV * const dsv0 = PERL_DEBUG_PAD_ZERO(0); - SV * const dsv1 = PERL_DEBUG_PAD_ZERO(1); + SV* dsv0; + SV* dsv1; #endif GET_RE_DEBUG_FLAGS_DECL; @@ -1621,6 +1621,13 @@ Perl_regexec_flags(pTHX_ register regexp *prog, char *stringarg, register char * return 0; } + multiline = prog->reganch & PMf_MULTILINE; + +#ifdef DEBUGGING + dsv0 = PERL_DEBUG_PAD_ZERO(0); + dsv1 = PERL_DEBUG_PAD_ZERO(1); +#endif + #ifdef DEBUGGING PL_regnarrate = DEBUG_r_TEST; #endif