From: gtsoul-tech Date: Tue, 23 Apr 2024 09:27:43 +0000 (+0300) Subject: unsignedLessThanZero cppcheck X-Git-Tag: vectorscan/5.4.12^2~63^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=06fc35321dddf2fefa19e812ffa43e0dde3bfb91;p=thirdparty%2Fvectorscan.git unsignedLessThanZero cppcheck --- diff --git a/src/parser/logical_combination.cpp b/src/parser/logical_combination.cpp index b75ca34f..a37f4e5f 100644 --- a/src/parser/logical_combination.cpp +++ b/src/parser/logical_combination.cpp @@ -284,7 +284,7 @@ void ParsedLogical::parseLogicalCombination(unsigned id, const char *logical, if (logical[i] == '(') { paren += 1; } else if (logical[i] == ')') { - if (paren <= 0) { + if (paren == 0) { throw LocatedParseError("Not enough left parentheses"); } paren -= 1;