mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
Use clang-tidy to add curly braces around one-line statements
The command used to reformat the files in this commit was: ./util/run-clang-tidy \ -clang-tidy-binary clang-tidy-11 -clang-apply-replacements-binary clang-apply-replacements-11 \ -checks=-*,readability-braces-around-statements \ -j 9 \ -fix \ -format \ -style=file \ -quiet clang-format -i --style=format $(git ls-files '*.c' '*.h') uncrustify -c .uncrustify.cfg --replace --no-backup $(git ls-files '*.c' '*.h') clang-format -i --style=format $(git ls-files '*.c' '*.h')
This commit is contained in:
@@ -51,18 +51,20 @@ respond(ns_client_t *client, isc_result_t result)
|
||||
rcode = dns_result_torcode(result);
|
||||
|
||||
msg_result = dns_message_reply(message, true);
|
||||
if (msg_result != ISC_R_SUCCESS)
|
||||
if (msg_result != ISC_R_SUCCESS) {
|
||||
msg_result = dns_message_reply(message, false);
|
||||
}
|
||||
if (msg_result != ISC_R_SUCCESS) {
|
||||
ns_client_drop(client, msg_result);
|
||||
isc_nmhandle_unref(client->handle);
|
||||
return;
|
||||
}
|
||||
message->rcode = rcode;
|
||||
if (rcode == dns_rcode_noerror)
|
||||
if (rcode == dns_rcode_noerror) {
|
||||
message->flags |= DNS_MESSAGEFLAG_AA;
|
||||
else
|
||||
} else {
|
||||
message->flags &= ~DNS_MESSAGEFLAG_AA;
|
||||
}
|
||||
|
||||
ns_client_send(client);
|
||||
isc_nmhandle_unref(client->handle);
|
||||
@@ -135,8 +137,9 @@ ns_notify_start(ns_client_t *client)
|
||||
snprintf(tsigbuf, sizeof(tsigbuf), ": TSIG '%s'",
|
||||
namebuf);
|
||||
}
|
||||
} else
|
||||
} else {
|
||||
tsigbuf[0] = '\0';
|
||||
}
|
||||
|
||||
dns_name_format(zonename, namebuf, sizeof(namebuf));
|
||||
result = dns_zt_find(client->view->zonetable, zonename, 0, NULL, &zone);
|
||||
@@ -164,7 +167,8 @@ ns_notify_start(ns_client_t *client)
|
||||
result = DNS_R_NOTAUTH;
|
||||
|
||||
done:
|
||||
if (zone != NULL)
|
||||
if (zone != NULL) {
|
||||
dns_zone_detach(&zone);
|
||||
}
|
||||
respond(client, result);
|
||||
}
|
||||
|
Reference in New Issue
Block a user