summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2005-06-30 11:40:37 +0000
committerNicholas Clark <nick@ccl4.org>2005-06-30 11:40:37 +0000
commitd0043bd135485a532d9aee2280acc8b2d782baa4 (patch)
tree221557e4e0e1619fa6f56f6d6112e1a560cb19ab /sv.c
parente6830b1398c4e7ce4800aa72b564ebd81702e14c (diff)
downloadperl-d0043bd135485a532d9aee2280acc8b2d782baa4.tar.gz
Replace newSVpv(...,0) with newSVpvn where we know the length.
p4raw-id: //depot/perl@25022
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sv.c b/sv.c
index 2aa2b5a895..101f8b631b 100644
--- a/sv.c
+++ b/sv.c
@@ -988,7 +988,7 @@ S_find_uninit_var(pTHX_ OP* obase, SV* uninit_sv, bool match)
case OP_SCHOMP:
case OP_CHOMP:
if (SvROK(PL_rs) && uninit_sv == SvRV(PL_rs))
- return sv_2mortal(newSVpv("${$/}", 0));
+ return sv_2mortal(newSVpvn("${$/}", 5));
/* FALL THROUGH */
default:
@@ -1837,7 +1837,7 @@ S_not_a_number(pTHX_ SV *sv)
const char *pv;
if (DO_UTF8(sv)) {
- dsv = sv_2mortal(newSVpv("", 0));
+ dsv = sv_2mortal(newSVpvn("", 0));
pv = sv_uni_display(dsv, sv, 10, 0);
} else {
char *d = tmpbuf;