From: Ondřej Surý Date: Tue, 19 Aug 2025 05:11:16 +0000 (+0200) Subject: Add and apply InsertBraces statement X-Git-Tag: v9.21.12~37^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d051e1e8f8eea1400191e0fd20641394b7d438be;p=thirdparty%2Fbind9.git Add and apply InsertBraces statement > Insert braces after control statements (if, else, for, do, and while) > in C++ unless the control statements are inside macro definitions or > the braces would enclose preprocessor directives. --- diff --git a/.clang-format b/.clang-format index ee6e784bbcf..cee38b60b7c 100644 --- a/.clang-format +++ b/.clang-format @@ -69,6 +69,7 @@ IncludeCategories: - Regex: '.*' Priority: 0 IndentExternBlock: NoIndent +InsertBraces: true KeepEmptyLinesAtTheStartOfBlocks: false MaxEmptyLinesToKeep: 1 PenaltyBreakAssignment: 30 diff --git a/.clang-format.headers b/.clang-format.headers index f5a5bae64e9..daeb0c2be51 100644 --- a/.clang-format.headers +++ b/.clang-format.headers @@ -69,6 +69,7 @@ IncludeCategories: - Regex: '.*' Priority: 0 IndentExternBlock: NoIndent +InsertBraces: true KeepEmptyLinesAtTheStartOfBlocks: false MaxEmptyLinesToKeep: 1 PenaltyBreakAssignment: 30 diff --git a/lib/isc/picohttpparser.c b/lib/isc/picohttpparser.c index 708265f60e7..933137714bc 100644 --- a/lib/isc/picohttpparser.c +++ b/lib/isc/picohttpparser.c @@ -752,7 +752,9 @@ Exit: if (decoder->_total_overhead >= 100 * 1024 && decoder->_total_read - decoder->_total_overhead < decoder->_total_read / 4) + { ret = -1; + } } return ret; }