From: Jarkko Hietaniemi Date: Tue, 11 Apr 2006 23:04:48 +0000 (+0300) Subject: regexec.c: move NULL check earlier to make Coverity happier X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bac066580cdb04efa84baa0fa96c51c7107436cf;p=p5sagit%2Fp5-mst-13.2.git regexec.c: move NULL check earlier to make Coverity happier Message-Id: <200604112004.k3BK4mV3097400@kosh.hut.fi> Date: Tue, 11 Apr 2006 23:04:48 +0300 (EEST) p4raw-id: //depot/perl@27772 --- diff --git a/regexec.c b/regexec.c index 2f4d8a7..61a0115 100644 --- a/regexec.c +++ b/regexec.c @@ -1615,12 +1615,6 @@ Perl_regexec_flags(pTHX_ register regexp *prog, char *stringarg, register char * GET_RE_DEBUG_FLAGS_DECL; PERL_UNUSED_ARG(data); - RX_MATCH_UTF8_set(prog,do_utf8); - - PL_reg_re = prog; -#ifdef DEBUGGING - PL_regnarrate = DEBUG_r_TEST; -#endif /* Be paranoid... */ if (prog == NULL || startpos == NULL) { @@ -1628,6 +1622,13 @@ Perl_regexec_flags(pTHX_ register regexp *prog, char *stringarg, register char * return 0; } + PL_reg_re = prog; +#ifdef DEBUGGING + PL_regnarrate = DEBUG_r_TEST; +#endif + + RX_MATCH_UTF8_set(prog, do_utf8); + minlen = prog->minlen; if (strend - startpos < minlen) { DEBUG_EXECUTE_r(PerlIO_printf(Perl_debug_log,