From 3ee39dae2bda6f68f824d840ef9712295f3d6250 Mon Sep 17 00:00:00 2001 From: Miciah Dashiel Butler Masters Date: Sat, 22 Dec 2007 03:20:27 +0000 Subject: [PATCH] css_parse_atrule: Drop an unnecessary check We have a while loop that checks token && token->type != '}' followed by an if statement that checks token && token->type == }. If the while loop exits, that either token is false or token->type == '}'; therefore, the if statement need only check token. --- src/document/css/parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/document/css/parser.c b/src/document/css/parser.c index 442fcec44..a133149db 100644 --- a/src/document/css/parser.c +++ b/src/document/css/parser.c @@ -236,7 +236,7 @@ css_parse_atrule(struct css_stylesheet *css, struct scanner *scanner, css_parse_ruleset(css, scanner); token = get_scanner_token(scanner); } - if (token && token->type == '}') + if (token) skip_scanner_token(scanner); break;