diff options
author | Father Chrysostomos <sprout@cpan.org> | 2014-10-16 08:28:29 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2014-10-16 08:28:29 -0700 |
commit | 47d3b731f074752fe0862ffdf333cfd3935f793a (patch) | |
tree | e8e2c137858bc53f15aa52738ded707d373f3b05 /sv.c | |
parent | 1310f67f4ef0cc3c6f42d26ff702a34799d6ac0d (diff) | |
download | perl-47d3b731f074752fe0862ffdf333cfd3935f793a.tar.gz |
sv.c:sv_catsv: Remove null check
SvPV always returns something. If it didn’t, we’d be crashing all
over the place, since most other code assumes it does.
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -5470,14 +5470,12 @@ Perl_sv_catsv_flags(pTHX_ SV *const dsv, SV *const ssv, const I32 flags) if (ssv) { STRLEN slen; const char *spv = SvPV_flags_const(ssv, slen, flags); - if (spv) { - if (flags & SV_GMAGIC) + if (flags & SV_GMAGIC) SvGETMAGIC(dsv); - sv_catpvn_flags(dsv, spv, slen, + sv_catpvn_flags(dsv, spv, slen, DO_UTF8(ssv) ? SV_CATUTF8 : SV_CATBYTES); - if (flags & SV_SMAGIC) + if (flags & SV_SMAGIC) SvSETMAGIC(dsv); - } } } |