summaryrefslogtreecommitdiff
path: root/regexec.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2006-04-12 02:04:48 +0300
committerNicholas Clark <nick@ccl4.org>2006-04-11 22:17:25 +0000
commitbac066580cdb04efa84baa0fa96c51c7107436cf (patch)
tree9b2b6c7e250f1ce2f578c0d5e3549ee6f715af99 /regexec.c
parent73060fc4fcb529eef1cf61f35c9ffe55d4ed47de (diff)
downloadperl-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.c13
1 files changed, 7 insertions, 6 deletions
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,