diff --git a/examples/rpl_udp/udp.c b/examples/rpl_udp/udp.c index 6d82510330..96584fad6f 100644 --- a/examples/rpl_udp/udp.c +++ b/examples/rpl_udp/udp.c @@ -105,8 +105,8 @@ void udp_send(int argc, char **argv) address = atoi(argv[1]); - strncpy(text, argv[2], sizeof (text)); - text[sizeof (text) - 1] = 0; + strncpy(text, argv[2], sizeof(text)); + text[sizeof(text) - 1] = 0; sock = destiny_socket(PF_INET6, SOCK_DGRAM, IPPROTO_UDP); @@ -115,7 +115,7 @@ void udp_send(int argc, char **argv) return; } - memset(&sa, 0, sizeof sa); + memset(&sa, 0, sizeof(sa)); ipv6_addr_init(&ipaddr, 0xabcd, 0x0, 0x0, 0x0, 0x3612, 0x00ff, 0xfe00, (uint16_t)address); @@ -125,7 +125,7 @@ void udp_send(int argc, char **argv) bytes_sent = destiny_socket_sendto(sock, (char *)text, strlen(text) + 1, 0, &sa, - sizeof sa); + sizeof(sa)); if (bytes_sent < 0) { printf("Error sending packet!\n"); diff --git a/tests/test_ipc_pingpong/main.c b/tests/test_ipc_pingpong/main.c index cc66a69930..b3fb074625 100644 --- a/tests/test_ipc_pingpong/main.c +++ b/tests/test_ipc_pingpong/main.c @@ -97,13 +97,13 @@ int main(void) { puts("Main thread start."); - pids[0] = thread_create(stacks[0], sizeof (stacks[0]), + pids[0] = thread_create(stacks[0], sizeof(stacks[0]), PRIORITY_MAIN - 1, CREATE_WOUT_YIELD | CREATE_STACKTEST, first_thread, "1st"); - pids[1] = thread_create(stacks[1], sizeof (stacks[1]), + pids[1] = thread_create(stacks[1], sizeof(stacks[1]), PRIORITY_MAIN - 2, CREATE_WOUT_YIELD | CREATE_STACKTEST, second_thread, "2nd"); - pids[2] = thread_create(stacks[2], sizeof (stacks[2]), + pids[2] = thread_create(stacks[2], sizeof(stacks[2]), PRIORITY_MAIN - 3, CREATE_WOUT_YIELD | CREATE_STACKTEST, third_thread, "3nd"); diff --git a/tests/test_pthread_rwlock/main.c b/tests/test_pthread_rwlock/main.c index 3cfca8d563..b6a96cc35f 100644 --- a/tests/test_pthread_rwlock/main.c +++ b/tests/test_pthread_rwlock/main.c @@ -124,7 +124,7 @@ int main(void) name = "writer"; } - thread_create(stacks[i], sizeof (stacks[i]), prio, CREATE_WOUT_YIELD | CREATE_STACKTEST, fun, name); + thread_create(stacks[i], sizeof(stacks[i]), prio, CREATE_WOUT_YIELD | CREATE_STACKTEST, fun, name); } puts("Main done."); diff --git a/tests/test_queue_fairness/main.c b/tests/test_queue_fairness/main.c index d02da715f6..1e9d3c0680 100644 --- a/tests/test_queue_fairness/main.c +++ b/tests/test_queue_fairness/main.c @@ -55,9 +55,9 @@ int main(void) parent_pid = sched_active_pid; for (int i = 0; i < NUM_CHILDREN; ++i) { - snprintf(names[i], sizeof (names[i]), "child%2u", i + 1); + snprintf(names[i], sizeof(names[i]), "child%2u", i + 1); pids[i] = thread_create(stacks[i], - sizeof (stacks[i]), + sizeof(stacks[i]), PRIORITY_MAIN + 1, CREATE_WOUT_YIELD | CREATE_STACKTEST, child_fun, diff --git a/tests/test_vtimer_msg/main.c b/tests/test_vtimer_msg/main.c index 0273770662..a639c939ae 100644 --- a/tests/test_vtimer_msg/main.c +++ b/tests/test_vtimer_msg/main.c @@ -48,7 +48,7 @@ void timer_thread(void) /* without a queue, the message would get lost */ /* because of the way this timer works, there can be max 1 queued message */ msg_t msgq[1]; - msg_init_queue(msgq, sizeof msgq); + msg_init_queue(msgq, sizeof(msgq)); while (1) { msg_t m; @@ -90,7 +90,7 @@ int main(void) msg_t m; int pid = thread_create( timer_stack, - sizeof timer_stack, + sizeof(timer_stack), PRIORITY_MAIN - 1, CREATE_STACKTEST, timer_thread, @@ -106,7 +106,7 @@ int main(void) int pid2 = thread_create( timer_stack_local, - sizeof timer_stack_local, + sizeof(timer_stack_local), PRIORITY_MAIN - 1, CREATE_STACKTEST, timer_thread_local, diff --git a/tests/test_vtimer_msg_diff/main.c b/tests/test_vtimer_msg_diff/main.c index 6998cec3b5..18866cca59 100644 --- a/tests/test_vtimer_msg_diff/main.c +++ b/tests/test_vtimer_msg_diff/main.c @@ -56,7 +56,7 @@ void timer_thread(void) printf("This is thread %d\n", thread_getpid()); msg_t msgq[16]; - msg_init_queue(msgq, sizeof msgq); + msg_init_queue(msgq, sizeof(msgq)); while (1) { msg_t m; @@ -102,7 +102,7 @@ int main(void) msg_t m; int pid = thread_create( timer_stack, - sizeof timer_stack, + sizeof(timer_stack), PRIORITY_MAIN - 1, CREATE_STACKTEST, timer_thread, diff --git a/tests/unittests/tests-core/tests-core-bitarithm.c b/tests/unittests/tests-core/tests-core-bitarithm.c index 723b301c71..e5c12d88e7 100644 --- a/tests/unittests/tests-core/tests-core-bitarithm.c +++ b/tests/unittests/tests-core/tests-core-bitarithm.c @@ -159,7 +159,7 @@ static void test_bitarithm_msb_random(void) static void test_bitarithm_msb_all(void) { - for (unsigned shift = 0; shift < sizeof (unsigned) * 8 - 1; ++shift) { + for (unsigned shift = 0; shift < sizeof(unsigned) * 8 - 1; ++shift) { TEST_ASSERT_EQUAL_INT(shift, bitarithm_msb(1 << shift)); } } @@ -171,7 +171,7 @@ static void test_bitarithm_lsb_one(void) static void test_bitarithm_lsb_limit(void) { - unsigned shift = sizeof (unsigned) * 8 - 1; + unsigned shift = sizeof(unsigned) * 8 - 1; TEST_ASSERT_EQUAL_INT(shift, bitarithm_lsb(1u << shift)); } @@ -183,7 +183,7 @@ static void test_bitarithm_lsb_random(void) static void test_bitarithm_lsb_all(void) { - for (unsigned shift = 0; shift < sizeof (unsigned) * 8 - 1; ++shift) { + for (unsigned shift = 0; shift < sizeof(unsigned) * 8 - 1; ++shift) { TEST_ASSERT_EQUAL_INT(shift, bitarithm_lsb(1u << shift)); } }