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

@@ -20,14 +20,13 @@
#include <isc/timer.h>
#include <isc/util.h>
isc_mem_t * mctx1, *mctx2, *mctx3;
isc_task_t * t1, *t2, *t3;
isc_mem_t *mctx1, *mctx2, *mctx3;
isc_task_t *t1, *t2, *t3;
isc_timer_t *ti1, *ti2, *ti3;
int tick_count = 0;
int tick_count = 0;
static void
shutdown_task(isc_task_t *task, isc_event_t *event)
{
shutdown_task(isc_task_t *task, isc_event_t *event) {
char *name = event->ev_arg;
printf("task %p shutdown %s\n", task, name);
@@ -35,8 +34,7 @@ shutdown_task(isc_task_t *task, isc_event_t *event)
}
static void
tick(isc_task_t *task, isc_event_t *event)
{
tick(isc_task_t *task, isc_event_t *event) {
char *name = event->ev_arg;
INSIST(event->ev_type == ISC_TIMEREVENT_TICK);
@@ -49,7 +47,7 @@ tick(isc_task_t *task, isc_event_t *event)
}
if (ti3 != NULL && tick_count == 7) {
isc_time_t expires;
isc_time_t expires;
isc_interval_t interval;
isc_interval_set(&interval, 5, 0);
@@ -65,9 +63,8 @@ tick(isc_task_t *task, isc_event_t *event)
}
static void
timeout(isc_task_t *task, isc_event_t *event)
{
char * name = event->ev_arg;
timeout(isc_task_t *task, isc_event_t *event) {
char *name = event->ev_arg;
const char *type;
INSIST(event->ev_type == ISC_TIMEREVENT_IDLE ||
@@ -95,13 +92,12 @@ static char two[] = "2";
static char three[] = "3";
int
main(int argc, char *argv[])
{
isc_taskmgr_t * manager = NULL;
main(int argc, char *argv[]) {
isc_taskmgr_t *manager = NULL;
isc_timermgr_t *timgr = NULL;
unsigned int workers;
isc_time_t expires, now;
isc_interval_t interval;
unsigned int workers;
isc_time_t expires, now;
isc_interval_t interval;
if (argc > 1) {
workers = atoi(argv[1]);