This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
toke.c consting and localizing
authorAndy Lester <andy@petdance.com>
Mon, 3 Jul 2006 17:42:50 +0000 (12:42 -0500)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Tue, 4 Jul 2006 09:42:12 +0000 (09:42 +0000)
Message-ID: <20060703224250.GA14481@petdance.com>

p4raw-id: //depot/perl@28476

toke.c

diff --git a/toke.c b/toke.c
index 5976732..c6e00ef 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -6697,7 +6697,7 @@ S_pending_ident(pTHX)
 {
     dVAR;
     register char *d;
-    register PADOFFSET tmp = 0;
+    PADOFFSET tmp = 0;
     /* pit holds the identifier we read and pending_ident is reset */
     char pit = PL_pending_ident;
     PL_pending_ident = 0;
@@ -11186,12 +11186,11 @@ S_scan_inputsymbol(pTHX_ char *start)
           filehandle
        */
        if (*d == '$') {
-           PADOFFSET tmp;
-
            /* try to find it in the pad for this block, otherwise find
               add symbol table ops
            */
-           if ((tmp = pad_findmy(d)) != NOT_IN_PAD) {
+           const PADOFFSET tmp = pad_findmy(d);
+           if (tmp != NOT_IN_PAD) {
                if (PAD_COMPNAME_FLAGS_isOUR(tmp)) {
                    HV * const stash = PAD_COMPNAME_OURSTASH(tmp);
                    HEK * const stashname = HvNAME_HEK(stash);