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 commitd3b49b6675)0255a974revise .clang-format and add a C formatting script in utile851ed0bapply the modified style
This commit is contained in:
@@ -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]);
|
||||
|
||||
Reference in New Issue
Block a user