Merge branch 'each-style-tweak' into 'master'

adjust clang-format options to get closer to ISC style

See merge request isc-projects/bind9!3061

(cherry picked from commit d3b49b6675)

0255a974 revise .clang-format and add a C formatting script in util
e851ed0b apply the modified style
This commit is contained in:
Ondřej Surý
2020-02-14 05:35:17 +00:00
parent c646c20e79
commit cdef20bb66
672 changed files with 36044 additions and 42228 deletions

View File

@@ -26,8 +26,7 @@
#include <isccfg/namedconf.h>
static void
check_result(isc_result_t result, const char *format, ...)
{
check_result(isc_result_t result, const char *format, ...) {
va_list args;
if (result == ISC_R_SUCCESS) {
@@ -42,15 +41,13 @@ check_result(isc_result_t result, const char *format, ...)
}
static void
output(void *closure, const char *text, int textlen)
{
output(void *closure, const char *text, int textlen) {
UNUSED(closure);
(void)fwrite(text, 1, textlen, stdout);
}
static void
usage(void)
{
usage(void) {
fprintf(stderr, "usage: cfg_test --rndc|--named "
"[--grammar] [--zonegrammar] [--active] "
"[--memstats] conffile\n");
@@ -58,21 +55,20 @@ usage(void)
}
int
main(int argc, char **argv)
{
isc_result_t result;
isc_mem_t * mctx = NULL;
isc_log_t * lctx = NULL;
isc_logconfig_t * lcfg = NULL;
main(int argc, char **argv) {
isc_result_t result;
isc_mem_t *mctx = NULL;
isc_log_t *lctx = NULL;
isc_logconfig_t *lcfg = NULL;
isc_logdestination_t destination;
cfg_parser_t * pctx = NULL;
cfg_obj_t * cfg = NULL;
cfg_type_t * type = NULL;
bool grammar = false;
bool memstats = false;
char * filename = NULL;
unsigned int zonetype = 0;
unsigned int pflags = 0;
cfg_parser_t *pctx = NULL;
cfg_obj_t *cfg = NULL;
cfg_type_t *type = NULL;
bool grammar = false;
bool memstats = false;
char *filename = NULL;
unsigned int zonetype = 0;
unsigned int pflags = 0;
isc_mem_create(&mctx);