From 2ec31dd9f923af3a899842b086bdc04c45569b29 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Sun, 3 Oct 2010 10:19:23 -0600 Subject: [PATCH] Small efficiency nit for regcurly() As previously written, a test was executed unnecessarily --- dquote_static.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dquote_static.c b/dquote_static.c index c6d22e2..fbd8c38 100644 --- a/dquote_static.c +++ b/dquote_static.c @@ -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; -- 1.8.3.1