From 45ddcc9fede45c0be1d4618197ddfb357e51a7a8 Mon Sep 17 00:00:00 2001 From: Tsarevich Dmitry Date: Sun, 23 Feb 2020 19:33:31 +0300 Subject: [PATCH] [perf] Remove excessive check for " Condition like while (A && (B || (!B && C)) can be simplified to while (A && (B || C)). --- src/parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parser.c b/src/parser.c index 48422f17..79dfc43b 100644 --- a/src/parser.c +++ b/src/parser.c @@ -89,7 +89,7 @@ static loc_cmd* get_loc_cmd(char c, char* line) { } r = i; // locate ending quote - while ((line[i] != 0) && ((line[i] != '"') || ((line[i] == '"') && (line[i-1] == '\\')))) { + while ((line[i] != 0) && ((line[i] != '"') || ((line[i-1] == '\\')))) { if ((line[i] == '"') && (line[i-1] == '\\')) { strcpy(&line[i-1], &line[i]); } else {