From 091e4bd3a1594b05bc0ee6fdc06116f56a4dc807 Mon Sep 17 00:00:00 2001 From: Fredrik Widlund Date: Mon, 4 Jan 2021 16:23:22 +0100 Subject: [PATCH] indent --- src/dynamic/pool.c | 7 +++---- test/pool.c | 9 ++++----- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/dynamic/pool.c b/src/dynamic/pool.c index 49937b7..83dc178 100644 --- a/src/dynamic/pool.c +++ b/src/dynamic/pool.c @@ -10,7 +10,6 @@ #include #include - #include "list.h" #include "buffer.h" #include "vector.h" @@ -137,7 +136,7 @@ static void pool_update(pool *pool) while (pool->workers_count > workers_goal) { - e = pool_send(pool, (pool_message[]){{.type = POOL_MESSAGE_WORKER}}); + e = pool_send(pool, (pool_message[]) {{.type = POOL_MESSAGE_WORKER}}); if (e == -1) break; pool->workers_count--; @@ -146,7 +145,7 @@ static void pool_update(pool *pool) while (!list_empty(&pool->jobs_queued)) { user = list_front(&pool->jobs_queued); - e = pool_send(pool, (pool_message[]){{.type = POOL_MESSAGE_JOB, .user = user}}); + e = pool_send(pool, (pool_message[]) {{.type = POOL_MESSAGE_JOB, .user = user}}); if (e == -1) break; list_splice(list_front(&pool->jobs_waiting), user); @@ -252,7 +251,7 @@ core_id pool_enqueue(pool *pool, core_callback *callback, void *state) pool_activated = 1; job = list_push_back(&pool->jobs_queued, NULL, sizeof *job); *job = (core_handler) {.callback = callback, .state = state}; - pool->jobs_count ++; + pool->jobs_count++; pool_update(pool); diff --git a/test/pool.c b/test/pool.c index d230358..0d6f9ed 100644 --- a/test/pool.c +++ b/test/pool.c @@ -186,16 +186,15 @@ void fails(__attribute__((unused)) void **unused) debug_socketpair = 0; assert_int_equal(pool_errors(&p), 1); core_destruct(NULL); - } int main() { const struct CMUnitTest tests[] = - { - cmocka_unit_test(basic), - cmocka_unit_test(fails), - }; + { + cmocka_unit_test(basic), + cmocka_unit_test(fails), + }; return cmocka_run_group_tests(tests, NULL, NULL); }