This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Use pvs macros instead of pvn where possible.
[perl5.git] / pp.c
diff --git a/pp.c b/pp.c
index c749cc2..fb66c08 100644 (file)
--- a/pp.c
+++ b/pp.c
@@ -2431,7 +2431,7 @@ PP(pp_negate)
            STRLEN len;
            const char * const s = SvPV_const(sv, len);
            if (isIDFIRST(*s)) {
            STRLEN len;
            const char * const s = SvPV_const(sv, len);
            if (isIDFIRST(*s)) {
-               sv_setpvn(TARG, "-", 1);
+               sv_setpvs(TARG, "-");
                sv_catsv(TARG, sv);
            }
            else if (*s == '+' || *s == '-') {
                sv_catsv(TARG, sv);
            }
            else if (*s == '+' || *s == '-') {
@@ -2445,7 +2445,7 @@ PP(pp_negate)
                if (SvNOK(sv))
                    sv_setnv(TARG, -SvNV(sv));
                else {
                if (SvNOK(sv))
                    sv_setnv(TARG, -SvNV(sv));
                else {
-                   sv_setpvn(TARG, "-", 1);
+                   sv_setpvs(TARG, "-");
                    sv_catsv(TARG, sv);
                }
            }
                    sv_catsv(TARG, sv);
                }
            }