summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2018-10-14 16:02:09 -0600
committerKarl Williamson <khw@cpan.org>2018-10-20 00:09:55 -0600
commite3f47c2f4d2eacb0570803023a6dd9c010aac7f4 (patch)
tree6d41e53153362f1a87889cf7b45683cc5bf29168
parent37e2eb2b2472e07aba322b6414447985237e34d4 (diff)
downloadperl-e3f47c2f4d2eacb0570803023a6dd9c010aac7f4.tar.gz
regcomp.c: Use an equivalent 'if' condition
By inspection of the code, I see that this 'if' won't get executed unless the variable is non-null. The function whose return sets it will raise an error if it would otherwise return NULL unexpectedly.
-rw-r--r--regcomp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/regcomp.c b/regcomp.c
index b5f7bb4deb..299ab2104c 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -10719,10 +10719,10 @@ S_handle_named_backref(pTHX_ RExC_state_t *pRExC_state,
vFAIL2("Sequence %.3s... not terminated", parse_start);
}
- if (!SIZE_ONLY) {
+ if (sv_dat) {
num = add_data( pRExC_state, STR_WITH_LEN("S"));
RExC_rxi->data->data[num]=(void*)sv_dat;
- SvREFCNT_inc_simple_void(sv_dat);
+ SvREFCNT_inc_simple_void_NN(sv_dat);
}
RExC_sawback = 1;
ret = reganode(pRExC_state,