From bac066580cdb04efa84baa0fa96c51c7107436cf Mon Sep 17 00:00:00 2001 From: Jarkko Hietaniemi Date: Wed, 12 Apr 2006 02:04:48 +0300 Subject: 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 --- regexec.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'regexec.c') diff --git a/regexec.c b/regexec.c index 2f4d8a71b4..61a011550a 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, -- cgit v1.2.1