Cleaning up shadowed variables
Andy Lester [Sun, 5 Feb 2006 21:56:43 +0000 (15:56 -0600)]
Message-Id: <B375E848-FA07-479D-9571-FA3925106D16@petdance.com>

p4raw-id: //depot/perl@27102

op.c
pp_ctl.c

diff --git a/op.c b/op.c
index 8dd2976..54c56c4 100644 (file)
--- a/op.c
+++ b/op.c
@@ -4883,8 +4883,8 @@ Perl_newXS(pTHX_ const char *name, XSUBADDR_t subaddr, const char *filename)
                if (gvcv) {
                    HV * const stash = GvSTASH(gvcv);
                    if (stash) {
-                       const char *name = HvNAME_get(stash);
-                       if ( strEQ(name,"autouse") ) {
+                       const char *redefined_name = HvNAME_get(stash);
+                       if ( strEQ(redefined_name,"autouse") ) {
                            const line_t oldline = CopLINE(PL_curcop);
                            if (PL_copline != NOLINE)
                                CopLINE_set(PL_curcop, PL_copline);
index e5e4dd9..3f0168e 100644 (file)
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -3446,12 +3446,12 @@ PP(pp_entereval)
     /* switch to eval mode */
 
     if (PERLDB_NAMEEVAL && CopLINE(PL_curcop)) {
-       SV * const sv = sv_newmortal();
-       Perl_sv_setpvf(aTHX_ sv, "_<(eval %lu)[%s:%"IVdf"]",
+       SV * const temp_sv = sv_newmortal();
+       Perl_sv_setpvf(aTHX_ temp_sv, "_<(eval %lu)[%s:%"IVdf"]",
                       (unsigned long)++PL_evalseq,
                       CopFILE(PL_curcop), (IV)CopLINE(PL_curcop));
-       tmpbuf = SvPVX(sv);
-       len = SvCUR(sv);
+       tmpbuf = SvPVX(temp_sv);
+       len = SvCUR(temp_sv);
     }
     else
        len = my_sprintf(tmpbuf, "_<(eval %lu)", (unsigned long)++PL_evalseq);