isSPACE('\0') is false, so can simplify the condition in the for
Nicholas Clark [Sat, 11 Mar 2006 23:40:34 +0000 (23:40 +0000)]
loop. As the for loop is basically a while loop, write it as one, to
make its intentions clearer.

p4raw-id: //depot/perl@27480

toke.c

diff --git a/toke.c b/toke.c
index f16964e..f256310 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -10167,8 +10167,8 @@ S_checkcomma(pTHX_ const char *s, const char *name, const char *what)
                else if (*w == ')')
                    --level;
            }
-           for (; *w && isSPACE(*w); w++)
-               /* EMPTY */;
+           while (isSPACE(*w))
+               ++w;
            if (!*w || !strchr(";|})]oaiuw!=", *w))     /* an advisory hack only... */
                Perl_warner(aTHX_ packWARN(WARN_SYNTAX),
                            "%s (...) interpreted as function",name);