mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-23 21:23:06 +00:00
Update brace style.
Add braces around single-line blocks, and remove line breaks before function-opening braces. This resolves #537.
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user