diff options
author | Karl Williamson <khw@cpan.org> | 2018-10-14 16:02:09 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2018-10-20 00:09:55 -0600 |
commit | e3f47c2f4d2eacb0570803023a6dd9c010aac7f4 (patch) | |
tree | 6d41e53153362f1a87889cf7b45683cc5bf29168 | |
parent | 37e2eb2b2472e07aba322b6414447985237e34d4 (diff) | |
download | perl-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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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, |