diff options
author | Jason Evans <jasone@canonware.com> | 2017-01-16 00:56:30 (GMT) |
---|---|---|
committer | Jason Evans <jasone@canonware.com> | 2017-01-21 05:43:07 (GMT) |
commit | c4c2592c834d8a37beb0a0d53842095160cbf9ee (patch) | |
tree | e4717ea6a2f13926dadd74ea1fc83f9742f77968 /test/unit/mq.c | |
parent | 5154ff32ee8c37bacb6afd8a07b923eb33228357 (diff) | |
download | jemalloc-c4c2592c834d8a37beb0a0d53842095160cbf9ee.zip jemalloc-c4c2592c834d8a37beb0a0d53842095160cbf9ee.tar.gz jemalloc-c4c2592c834d8a37beb0a0d53842095160cbf9ee.tar.bz2 |
Update brace style.
Add braces around single-line blocks, and remove line breaks before
function-opening braces.
This resolves #537.
Diffstat (limited to 'test/unit/mq.c')
-rw-r--r-- | test/unit/mq.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/test/unit/mq.c b/test/unit/mq.c index bd289c5..95c9c50 100644 --- a/test/unit/mq.c +++ b/test/unit/mq.c @@ -9,8 +9,7 @@ struct mq_msg_s { }; mq_gen(static, mq_, mq_t, mq_msg_t, link) -TEST_BEGIN(test_mq_basic) -{ +TEST_BEGIN(test_mq_basic) { mq_t mq; mq_msg_t msg; @@ -31,8 +30,7 @@ TEST_BEGIN(test_mq_basic) TEST_END static void * -thd_receiver_start(void *arg) -{ +thd_receiver_start(void *arg) { mq_t *mq = (mq_t *)arg; unsigned i; @@ -45,8 +43,7 @@ thd_receiver_start(void *arg) } static void * -thd_sender_start(void *arg) -{ +thd_sender_start(void *arg) { mq_t *mq = (mq_t *)arg; unsigned i; @@ -61,8 +58,7 @@ thd_sender_start(void *arg) return (NULL); } -TEST_BEGIN(test_mq_threaded) -{ +TEST_BEGIN(test_mq_threaded) { mq_t mq; thd_t receiver; thd_t senders[NSENDERS]; @@ -71,20 +67,21 @@ TEST_BEGIN(test_mq_threaded) assert_false(mq_init(&mq), "Unexpected mq_init() failure"); thd_create(&receiver, thd_receiver_start, (void *)&mq); - for (i = 0; i < NSENDERS; i++) + for (i = 0; i < NSENDERS; i++) { thd_create(&senders[i], thd_sender_start, (void *)&mq); + } thd_join(receiver, NULL); - for (i = 0; i < NSENDERS; i++) + for (i = 0; i < NSENDERS; i++) { thd_join(senders[i], NULL); + } mq_fini(&mq); } TEST_END int -main(void) -{ +main(void) { return (test( test_mq_basic, test_mq_threaded)); |