mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-05 09:05:40 +00:00
Use coccinelle to add braces to nested single line statement
Both clang-tidy and uncrustify chokes on statement like this: for (...) if (...) break; This commit uses a very simple semantic patch (below) to add braces around such statements. Semantic patch used: @@ statement S; expression E; @@ while (...) - if (E) S + { if (E) { S } } @@ statement S; expression E; @@ for (...;...;...) - if (E) S + { if (E) { S } } @@ statement S; expression E; @@ if (...) - if (E) S + { if (E) { S } }
This commit is contained in:
@@ -257,9 +257,11 @@ dst_lib_destroy(void)
|
||||
RUNTIME_CHECK(dst_initialized == true);
|
||||
dst_initialized = false;
|
||||
|
||||
for (i = 0; i < DST_MAX_ALGS; i++)
|
||||
if (dst_t_func[i] != NULL && dst_t_func[i]->cleanup != NULL)
|
||||
for (i = 0; i < DST_MAX_ALGS; i++) {
|
||||
if (dst_t_func[i] != NULL && dst_t_func[i]->cleanup != NULL) {
|
||||
dst_t_func[i]->cleanup();
|
||||
}
|
||||
}
|
||||
dst__openssl_destroy();
|
||||
#if USE_PKCS11
|
||||
(void)dst__pkcs11_destroy();
|
||||
|
Reference in New Issue
Block a user