diff options
Diffstat (limited to 'test/core/iomgr/timer_list_test.c')
-rw-r--r-- | test/core/iomgr/timer_list_test.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/test/core/iomgr/timer_list_test.c b/test/core/iomgr/timer_list_test.c index c3d9f9d88d..d530dfb985 100644 --- a/test/core/iomgr/timer_list_test.c +++ b/test/core/iomgr/timer_list_test.c @@ -36,7 +36,7 @@ extern grpc_tracer_flag grpc_timer_check_trace; static int cb_called[MAX_CB][2]; -static void cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { +static void cb(grpc_exec_ctx* exec_ctx, void* arg, grpc_error* error) { cb_called[(intptr_t)arg][error == GRPC_ERROR_NONE]++; } @@ -56,16 +56,16 @@ static void add_test(void) { /* 10 ms timers. will expire in the current epoch */ for (i = 0; i < 10; i++) { - grpc_timer_init(&exec_ctx, &timers[i], start + 10, - GRPC_CLOSURE_CREATE(cb, (void *)(intptr_t)i, - grpc_schedule_on_exec_ctx)); + grpc_timer_init( + &exec_ctx, &timers[i], start + 10, + GRPC_CLOSURE_CREATE(cb, (void*)(intptr_t)i, grpc_schedule_on_exec_ctx)); } /* 1010 ms timers. will expire in the next epoch */ for (i = 10; i < 20; i++) { - grpc_timer_init(&exec_ctx, &timers[i], start + 1010, - GRPC_CLOSURE_CREATE(cb, (void *)(intptr_t)i, - grpc_schedule_on_exec_ctx)); + grpc_timer_init( + &exec_ctx, &timers[i], start + 1010, + GRPC_CLOSURE_CREATE(cb, (void*)(intptr_t)i, grpc_schedule_on_exec_ctx)); } /* collect timers. Only the first batch should be ready. */ @@ -123,19 +123,19 @@ void destruction_test(void) { grpc_timer_init( &exec_ctx, &timers[0], 100, - GRPC_CLOSURE_CREATE(cb, (void *)(intptr_t)0, grpc_schedule_on_exec_ctx)); + GRPC_CLOSURE_CREATE(cb, (void*)(intptr_t)0, grpc_schedule_on_exec_ctx)); grpc_timer_init( &exec_ctx, &timers[1], 3, - GRPC_CLOSURE_CREATE(cb, (void *)(intptr_t)1, grpc_schedule_on_exec_ctx)); + GRPC_CLOSURE_CREATE(cb, (void*)(intptr_t)1, grpc_schedule_on_exec_ctx)); grpc_timer_init( &exec_ctx, &timers[2], 100, - GRPC_CLOSURE_CREATE(cb, (void *)(intptr_t)2, grpc_schedule_on_exec_ctx)); + GRPC_CLOSURE_CREATE(cb, (void*)(intptr_t)2, grpc_schedule_on_exec_ctx)); grpc_timer_init( &exec_ctx, &timers[3], 3, - GRPC_CLOSURE_CREATE(cb, (void *)(intptr_t)3, grpc_schedule_on_exec_ctx)); + GRPC_CLOSURE_CREATE(cb, (void*)(intptr_t)3, grpc_schedule_on_exec_ctx)); grpc_timer_init( &exec_ctx, &timers[4], 1, - GRPC_CLOSURE_CREATE(cb, (void *)(intptr_t)4, grpc_schedule_on_exec_ctx)); + GRPC_CLOSURE_CREATE(cb, (void*)(intptr_t)4, grpc_schedule_on_exec_ctx)); exec_ctx.now = 2; GPR_ASSERT(grpc_timer_check(&exec_ctx, NULL) == GRPC_TIMERS_FIRED); grpc_exec_ctx_finish(&exec_ctx); @@ -152,7 +152,7 @@ void destruction_test(void) { GPR_ASSERT(1 == cb_called[2][0]); } -int main(int argc, char **argv) { +int main(int argc, char** argv) { grpc_test_init(argc, argv); gpr_set_log_verbosity(GPR_LOG_SEVERITY_DEBUG); add_test(); @@ -162,6 +162,6 @@ int main(int argc, char **argv) { #else /* GRPC_TIMER_USE_GENERIC */ -int main(int argc, char **argv) { return 1; } +int main(int argc, char** argv) { return 1; } #endif /* GRPC_TIMER_USE_GENERIC */ |