This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Encourage compilers to tail call optimise in sv_savepv, sv_savepvn
[perl5.git] / sv.c
diff --git a/sv.c b/sv.c
index 50501e7..9079315 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -3742,9 +3742,8 @@ Perl_sv_2pv_flags(pTHX_ register SV *sv, STRLEN *lp, I32 flags)
        *lp = len;
        s = SvGROW(sv, len + 1);
        SvCUR_set(sv, len);
-       (void)strcpy(s, t);
        SvPOKp_on(sv);
-       return s;
+       return strcpy(s, t);
     }
 }