summaryrefslogtreecommitdiff
path: root/doop.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2006-04-16 13:25:18 +0000
committerNicholas Clark <nick@ccl4.org>2006-04-16 13:25:18 +0000
commitaa0a69cb4bc6ac8103067b4dd5c2d09748f9d78d (patch)
tree914611769e5a881b792bfa2552c84d59d795e05a /doop.c
parent2e90b4cd9b8959c8a9cede0cb14ef5338ec93d49 (diff)
downloadperl-aa0a69cb4bc6ac8103067b4dd5c2d09748f9d78d.tar.gz
Perl_do_vop can profitably use Perl_sv_usepvn_flags, as it has
allocated space for an initialised a trailing NUL. p4raw-id: //depot/perl@27843
Diffstat (limited to 'doop.c')
-rw-r--r--doop.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/doop.c b/doop.c
index cfc67cbce8..5972dbd2a6 100644
--- a/doop.c
+++ b/doop.c
@@ -1214,7 +1214,7 @@ Perl_do_vop(pTHX_ I32 optype, SV *sv, SV *left, SV *right)
needlen = ((optype == OP_BIT_AND)
? len : (leftlen > rightlen ? leftlen : rightlen));
Newxz(dc, needlen + 1, char);
- (void)sv_usepvn(sv, dc, needlen);
+ sv_usepvn_flags(sv, dc, needlen, SV_HAS_TRAILING_NUL);
dc = SvPVX(sv); /* sv_usepvn() calls Renew() */
}
SvCUR_set(sv, len);