Small efficiency nit for regcurly()
authorKarl Williamson <public@khwilliamson.com>
Sun, 3 Oct 2010 16:19:23 +0000 (10:19 -0600)
committerFather Chrysostomos <sprout@cpan.org>
Sun, 3 Oct 2010 20:45:39 +0000 (13:45 -0700)
As previously written, a test was executed unnecessarily

dquote_static.c

index c6d22e2..fbd8c38 100644 (file)
@@ -32,10 +32,11 @@ regcurly(register const char *s)
        return FALSE;
     while (isDIGIT(*s))
        s++;
-    if (*s == ',')
-       s++;
-    while (isDIGIT(*s))
+    if (*s == ',') {
        s++;
+       while (isDIGIT(*s))
+           s++;
+    }
     if (*s != '}')
        return FALSE;
     return TRUE;