2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

Use ControlStatementsExceptControlMacros for SpaceBeforeParens

> Put a space before opening parentheses only after control statement
> keywords (for/if/while...) except this option doesn’t apply to ForEach
> and If macros. This is useful in projects where ForEach/If macros are
> treated as function calls instead of control statements.
This commit is contained in:
Ondřej Surý
2025-08-19 07:14:45 +02:00
parent d051e1e8f8
commit 42496f3f4a
103 changed files with 910 additions and 908 deletions

View File

@@ -1949,7 +1949,7 @@ free_listelt(cfg_parser_t *pctx, cfg_listelt_t *elt) {
static void
free_list(cfg_parser_t *pctx, cfg_obj_t *obj) {
ISC_LIST_FOREACH (obj->value.list, elt, link) {
ISC_LIST_FOREACH(obj->value.list, elt, link) {
free_listelt(pctx, elt);
}
}
@@ -2022,7 +2022,7 @@ static void
print_list(cfg_printer_t *pctx, const cfg_obj_t *obj) {
cfg_list_t *list = UNCONST(&obj->value.list);
ISC_LIST_FOREACH (*list, elt, link) {
ISC_LIST_FOREACH(*list, elt, link) {
if ((pctx->flags & CFG_PRINTER_ONELINE) != 0) {
cfg_print_obj(pctx, elt->obj);
cfg_print_cstr(pctx, "; ");
@@ -2119,7 +2119,7 @@ cfg_print_spacelist(cfg_printer_t *pctx, const cfg_obj_t *obj) {
list = UNCONST(&obj->value.list);
ISC_LIST_FOREACH (*list, elt, link) {
ISC_LIST_FOREACH(*list, elt, link) {
cfg_print_obj(pctx, elt->obj);
if (ISC_LIST_NEXT(elt, link) != NULL) {
cfg_print_cstr(pctx, " ");
@@ -2543,7 +2543,7 @@ cfg_print_mapbody(cfg_printer_t *pctx, const cfg_obj_t *obj) {
if (symobj->type == &cfg_type_implicitlist) {
/* Multivalued. */
cfg_list_t *list = &symobj->value.list;
ISC_LIST_FOREACH (*list, elt, link) {
ISC_LIST_FOREACH(*list, elt, link) {
print_symval(pctx, clause->name,
elt->obj);
}
@@ -3951,7 +3951,7 @@ cfg_pluginlist_foreach(const cfg_obj_t *config, const cfg_obj_t *list,
REQUIRE(config != NULL);
REQUIRE(callback != NULL);
CFG_LIST_FOREACH (list, element) {
CFG_LIST_FOREACH(list, element) {
const cfg_obj_t *plugin = cfg_listelt_value(element);
const cfg_obj_t *obj;
const char *type, *library;