mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-10 20:19:59 -04:00
Cleanup the code to remove unnecessary indentation
Because of the "goto" in the "if" body the "else" part is unnecessary
and adds another level of indentation.
Cleanup the code to not have the "else" part.
(cherry picked from commit 9b84bfb5f4)
This commit is contained in:
parent
c79c059c4e
commit
263b9d69af
1 changed files with 35 additions and 39 deletions
|
|
@ -2681,6 +2681,8 @@ catz_addmodzone_taskaction(isc_task_t *task, isc_event_t *event0) {
|
|||
dns_catz_entry_getname(ev->entry), 0, NULL, &zone);
|
||||
|
||||
if (ev->mod) {
|
||||
dns_catz_zone_t *parentcatz;
|
||||
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||
NAMED_LOGMODULE_SERVER, ISC_LOG_WARNING,
|
||||
|
|
@ -2688,46 +2690,40 @@ catz_addmodzone_taskaction(isc_task_t *task, isc_event_t *event0) {
|
|||
"modify zone \"%s\"",
|
||||
isc_result_totext(result), nameb);
|
||||
goto cleanup;
|
||||
} else {
|
||||
dns_catz_zone_t *parentcatz;
|
||||
|
||||
if (!dns_zone_getadded(zone)) {
|
||||
isc_log_write(
|
||||
named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||
NAMED_LOGMODULE_SERVER, ISC_LOG_WARNING,
|
||||
"catz: "
|
||||
"catz_addmodzone_taskaction: "
|
||||
"zone '%s' is not a dynamically "
|
||||
"added zone",
|
||||
nameb);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
parentcatz = dns_zone_get_parentcatz(zone);
|
||||
|
||||
if (parentcatz == NULL) {
|
||||
isc_log_write(
|
||||
named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||
NAMED_LOGMODULE_SERVER, ISC_LOG_WARNING,
|
||||
"catz: catz_addmodzone_taskaction: "
|
||||
"zone '%s' exists and is not added by "
|
||||
"a catalog zone, so won't be modified",
|
||||
nameb);
|
||||
goto cleanup;
|
||||
}
|
||||
if (parentcatz != ev->origin) {
|
||||
isc_log_write(
|
||||
named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||
NAMED_LOGMODULE_SERVER, ISC_LOG_WARNING,
|
||||
"catz: catz_addmodzone_taskaction: "
|
||||
"zone '%s' exists in multiple "
|
||||
"catalog zones",
|
||||
nameb);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
dns_zone_detach(&zone);
|
||||
}
|
||||
|
||||
if (!dns_zone_getadded(zone)) {
|
||||
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||
NAMED_LOGMODULE_SERVER, ISC_LOG_WARNING,
|
||||
"catz: catz_addmodzone_taskaction: "
|
||||
"zone '%s' is not a dynamically "
|
||||
"added zone",
|
||||
nameb);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
parentcatz = dns_zone_get_parentcatz(zone);
|
||||
|
||||
if (parentcatz == NULL) {
|
||||
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||
NAMED_LOGMODULE_SERVER, ISC_LOG_WARNING,
|
||||
"catz: catz_addmodzone_taskaction: "
|
||||
"zone '%s' exists and is not added by "
|
||||
"a catalog zone, so won't be modified",
|
||||
nameb);
|
||||
goto cleanup;
|
||||
}
|
||||
if (parentcatz != ev->origin) {
|
||||
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||
NAMED_LOGMODULE_SERVER, ISC_LOG_WARNING,
|
||||
"catz: catz_addmodzone_taskaction: "
|
||||
"zone '%s' exists in multiple "
|
||||
"catalog zones",
|
||||
nameb);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
dns_zone_detach(&zone);
|
||||
} else {
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||
|
|
|
|||
Loading…
Reference in a new issue