Merge branch '46-add-curly-braces' into 'master'

Add curly braces using uncrustify and then reformat with clang-format back

Closes #46

See merge request isc-projects/bind9!3057

(cherry picked from commit 67b68e06ad)

36c6105e Use coccinelle to add braces to nested single line statement
d14bb713 Add copy of run-clang-tidy that can fixup the filepaths
056e133c Use clang-tidy to add curly braces around one-line statements
This commit is contained in:
Ondřej Surý
2020-02-13 21:28:07 +00:00
parent 6270e602ea
commit 2e55baddd8
639 changed files with 29724 additions and 17080 deletions

View File

@@ -87,12 +87,14 @@ cleanup:
log_error_r("failed to create new zone '%s'", zone_name);
if (raw != NULL) {
if (dns_zone_getmgr(raw) != NULL)
if (dns_zone_getmgr(raw) != NULL) {
dns_zonemgr_releasezone(inst->zmgr, raw);
}
dns_zone_detach(&raw);
}
if (acl_any != NULL)
if (acl_any != NULL) {
dns_acl_detach(&acl_any);
}
return (result);
}
@@ -116,8 +118,9 @@ publish_zone(sample_instance_t *inst, dns_zone_t *zone)
/* Return success if the zone is already in the view as expected. */
result = dns_view_findzone(inst->view, dns_zone_getorigin(zone),
&zone_in_view);
if (result != ISC_R_SUCCESS && result != ISC_R_NOTFOUND)
if (result != ISC_R_SUCCESS && result != ISC_R_NOTFOUND) {
goto cleanup;
}
view_in_zone = dns_zone_getview(zone);
if (view_in_zone != NULL) {
@@ -161,10 +164,12 @@ publish_zone(sample_instance_t *inst, dns_zone_t *zone)
}
cleanup:
if (zone_in_view != NULL)
if (zone_in_view != NULL) {
dns_zone_detach(&zone_in_view);
if (freeze)
}
if (freeze) {
dns_view_freeze(inst->view);
}
run_exclusive_exit(inst, lock_state);
return (result);
@@ -183,8 +188,9 @@ load_zone(dns_zone_t *zone)
result = dns_zone_load(zone, false);
if (result != ISC_R_SUCCESS && result != DNS_R_UPTODATE &&
result != DNS_R_DYNAMIC && result != DNS_R_CONTINUE)
result != DNS_R_DYNAMIC && result != DNS_R_CONTINUE) {
goto cleanup;
}
zone_dynamic = (result == DNS_R_DYNAMIC);
result = dns_zone_getserial(zone, &serial);
@@ -196,8 +202,9 @@ load_zone(dns_zone_t *zone)
}
dns_zone_log(zone, ISC_LOG_INFO, "loaded serial %u", serial);
if (zone_dynamic)
if (zone_dynamic) {
dns_zone_notify(zone);
}
cleanup:
return (result);