summaryrefslogtreecommitdiff
path: root/regexec.c
diff options
context:
space:
mode:
Diffstat (limited to 'regexec.c')
-rw-r--r--regexec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/regexec.c b/regexec.c
index d343c91006..a8ee6194e4 100644
--- a/regexec.c
+++ b/regexec.c
@@ -2783,7 +2783,7 @@ Perl_regexec_flags(pTHX_ REGEXP * const rx, char *stringarg, char *strend,
PERL_UNUSED_ARG(data);
/* Be paranoid... */
- if (prog == NULL || stringarg == NULL) {
+ if (prog == NULL) {
Perl_croak(aTHX_ "NULL regexp parameter");
}
@@ -2802,7 +2802,7 @@ Perl_regexec_flags(pTHX_ REGEXP * const rx, char *stringarg, char *strend,
reginfo->ganch =
(flags & REXEC_IGNOREPOS)
? stringarg /* use start pos rather than pos() */
- : (sv && (mg = mg_find_mglob(sv)) && mg->mg_len >= 0)
+ : ((mg = mg_find_mglob(sv)) && mg->mg_len >= 0)
/* Defined pos(): */
? strbeg + MgBYTEPOS(mg, sv, strbeg, strend-strbeg)
: strbeg; /* pos() not defined; use start of string */