[win32] fix typo in Makefile
[p5sagit/p5-mst-13.2.git] / doio.c
diff --git a/doio.c b/doio.c
index cc038e2..af65e6e 100644 (file)
--- a/doio.c
+++ b/doio.c
@@ -839,6 +839,7 @@ my_stat(ARGSproto)
     }
     else {
        SV* sv = POPs;
+       char *s;
        PUTBACK;
        if (SvTYPE(sv) == SVt_PVGV) {
            tmpgv = (GV*)sv;
@@ -849,11 +850,12 @@ my_stat(ARGSproto)
            goto do_fstat;
        }
 
+       s = SvPV(sv, na);
        statgv = Nullgv;
-       sv_setpv(statname,SvPV(sv, na));
+       sv_setpv(statname, s);
        laststype = OP_STAT;
-       laststatval = PerlLIO_stat(SvPV(sv, na),&statcache);
-       if (laststatval < 0 && dowarn && strchr(SvPV(sv, na), '\n'))
+       laststatval = PerlLIO_stat(s, &statcache);
+       if (laststatval < 0 && dowarn && strchr(s, '\n'))
            warn(warn_nl, "stat");
        return laststatval;
     }