diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2006-04-12 02:04:48 +0300 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2006-04-11 22:17:25 +0000 |
commit | bac066580cdb04efa84baa0fa96c51c7107436cf (patch) | |
tree | 9b2b6c7e250f1ce2f578c0d5e3549ee6f715af99 /regexec.c | |
parent | 73060fc4fcb529eef1cf61f35c9ffe55d4ed47de (diff) | |
download | perl-bac066580cdb04efa84baa0fa96c51c7107436cf.tar.gz |
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
Diffstat (limited to 'regexec.c')
-rw-r--r-- | regexec.c | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -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, |