summaryrefslogtreecommitdiff
path: root/doio.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2005-04-05 16:09:59 +0000
committerNicholas Clark <nick@ccl4.org>2005-04-05 16:09:59 +0000
commit705bfa5f438d0b377898a48829d400d708246a4c (patch)
treee80c2e75e8497cb6d9c4adcbdf06659fbd3217cd /doio.c
parent628bbff0c15c13c4704c1f63e1b8dac4c47eb639 (diff)
downloadperl-705bfa5f438d0b377898a48829d400d708246a4c.tar.gz
Using savesvpv() here is terser and produces smaller object code.
p4raw-id: //depot/perl@24167
Diffstat (limited to 'doio.c')
-rw-r--r--doio.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/doio.c b/doio.c
index e9effd95b6..26079cb4ae 100644
--- a/doio.c
+++ b/doio.c
@@ -219,7 +219,6 @@ Perl_do_openn(pTHX_ GV *gv, register char *name, I32 len, int as_raw,
if (num_svs) {
/* New style explicit name, type is just mode and layer info */
- STRLEN l = 0;
#ifdef USE_STDIO
if (SvROK(*svp) && !strchr(name,'&')) {
if (ckWARN(WARN_IO))
@@ -229,9 +228,7 @@ Perl_do_openn(pTHX_ GV *gv, register char *name, I32 len, int as_raw,
goto say_false;
}
#endif /* USE_STDIO */
- name = SvOK(*svp) ? SvPV(*svp, l) : "";
- len = (I32)l;
- name = savepvn(name, len);
+ name = SvOK(*svp) ? savesvpv (*svp) : savepvn ("", 0);
SAVEFREEPV(name);
}
else {