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:
@@ -30,8 +30,9 @@ check_result(isc_result_t result, const char *format, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
||||
if (result == ISC_R_SUCCESS)
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
return;
|
||||
}
|
||||
|
||||
va_start(args, format);
|
||||
vfprintf(stderr, format, args);
|
||||
@@ -98,8 +99,9 @@ main(int argc, char **argv)
|
||||
*/
|
||||
isc_log_setdebuglevel(lctx, 2);
|
||||
|
||||
if (argc < 3)
|
||||
if (argc < 3) {
|
||||
usage();
|
||||
}
|
||||
|
||||
while (argc > 1) {
|
||||
if (strcmp(argv[1], "--active") == 0) {
|
||||
@@ -151,14 +153,16 @@ main(int argc, char **argv)
|
||||
}
|
||||
|
||||
if (grammar) {
|
||||
if (type == NULL)
|
||||
if (type == NULL) {
|
||||
usage();
|
||||
}
|
||||
cfg_print_grammar(type, pflags, output, NULL);
|
||||
} else if (zonetype != 0) {
|
||||
cfg_print_zonegrammar(zonetype, pflags, output, NULL);
|
||||
} else {
|
||||
if (type == NULL || filename == NULL)
|
||||
if (type == NULL || filename == NULL) {
|
||||
usage();
|
||||
}
|
||||
RUNTIME_CHECK(cfg_parser_create(mctx, lctx, &pctx) ==
|
||||
ISC_R_SUCCESS);
|
||||
|
||||
@@ -166,8 +170,9 @@ main(int argc, char **argv)
|
||||
|
||||
fprintf(stderr, "read config: %s\n", isc_result_totext(result));
|
||||
|
||||
if (result != ISC_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
cfg_print(cfg, output, NULL);
|
||||
|
||||
@@ -177,14 +182,16 @@ main(int argc, char **argv)
|
||||
}
|
||||
|
||||
isc_log_destroy(&lctx);
|
||||
if (memstats)
|
||||
if (memstats) {
|
||||
isc_mem_stats(mctx, stderr);
|
||||
}
|
||||
isc_mem_destroy(&mctx);
|
||||
|
||||
fflush(stdout);
|
||||
if (ferror(stdout)) {
|
||||
fprintf(stderr, "write error\n");
|
||||
return (1);
|
||||
} else
|
||||
} else {
|
||||
return (0);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user