]> granicus.if.org Git - apache/commitdiff
minor optimization.
authorAndré Malo <nd@apache.org>
Wed, 27 Aug 2003 15:35:13 +0000 (15:35 +0000)
committerAndré Malo <nd@apache.org>
Wed, 27 Aug 2003 15:35:13 +0000 (15:35 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101111 13f79535-47bb-0310-9956-ffa450edef68

modules/filters/mod_include.c

index 8fa10af77d57ba8a07400f63b43be8d11094fbfe..824b7936529f30e5d588e5778fb6a0eaf5aa9135 100644 (file)
@@ -1329,13 +1329,10 @@ static int parse_expr(include_ctx_t *ctx, const char *expr, int *was_error)
             break;
 
         case TOKEN_RBRACE:
-            while (current) {
-                if (current->token.type == TOKEN_LBRACE) {
-                    TYPE_TOKEN(&current->token, TOKEN_GROUP);
-                    break;
-                }
+            while (current && current->token.type != TOKEN_LBRACE) {
                 current = current->parent;
             }
+
             if (!current) {
                 ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
                               "Unmatched ')' in \"%s\" in file %s",
@@ -1343,6 +1340,8 @@ static int parse_expr(include_ctx_t *ctx, const char *expr, int *was_error)
                 *was_error = 1;
                 return retval;
             }
+
+            TYPE_TOKEN(&current->token, TOKEN_GROUP);
             break;
 
         case TOKEN_NOT: