From 705bfa5f438d0b377898a48829d400d708246a4c Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Tue, 5 Apr 2005 16:09:59 +0000 Subject: Using savesvpv() here is terser and produces smaller object code. p4raw-id: //depot/perl@24167 --- doio.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'doio.c') 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 { -- cgit v1.2.1