]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Add and apply InsertBraces statement
authorOndřej Surý <ondrej@isc.org>
Tue, 19 Aug 2025 05:11:16 +0000 (07:11 +0200)
committerOndřej Surý <ondrej@isc.org>
Tue, 19 Aug 2025 05:58:33 +0000 (07:58 +0200)
> 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.

.clang-format
.clang-format.headers
lib/isc/picohttpparser.c

index ee6e784bbcf180bf7a825b663b3481837bd6c8df..cee38b60b7c1a6e8fc4477543162367c47d8aad3 100644 (file)
@@ -69,6 +69,7 @@ IncludeCategories:
   - Regex:           '.*'
     Priority:        0
 IndentExternBlock: NoIndent
+InsertBraces: true
 KeepEmptyLinesAtTheStartOfBlocks: false
 MaxEmptyLinesToKeep: 1
 PenaltyBreakAssignment: 30
index f5a5bae64e955ac0fa9f563f452fe692eb5577fa..daeb0c2be517d01ad93b2a97e0b1ff5c7f4ccb84 100644 (file)
@@ -69,6 +69,7 @@ IncludeCategories:
   - Regex:           '.*'
     Priority:        0
 IndentExternBlock: NoIndent
+InsertBraces: true
 KeepEmptyLinesAtTheStartOfBlocks: false
 MaxEmptyLinesToKeep: 1
 PenaltyBreakAssignment: 30
index 708265f60e759ec68e01278f15a04a0667ee5d48..933137714bcae7d6d4cac6d547a500b779097ae9 100644 (file)
@@ -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;
 }