Skip to content

Commit 714857a

Browse files
authored
Merge pull request #21886 from maribu/tests/core/msg_queue_print
tests/core/msg_queue_print: fully initialize msg for sending
2 parents 7d5e943 + 2d475b3 commit 714857a

File tree

1 file changed

+8
-4
lines changed
  • tests/core/msg_queue_print

1 file changed

+8
-4
lines changed

tests/core/msg_queue_print/main.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,10 @@ int main(void)
3939

4040
/* fill message queue */
4141
for (uintptr_t i = 0; i < QUEUE_SIZE; i++) {
42-
msg.type = i;
43-
msg.content.ptr = (void *) i;
42+
msg = (msg_t) {
43+
.type = i,
44+
.content.ptr = (void *)i,
45+
};
4446
msg_send_to_self(&msg);
4547
}
4648

@@ -55,8 +57,10 @@ int main(void)
5557

5658
/* fill up message queue again */
5759
for (uintptr_t i = QUEUE_SIZE; i < QUEUE_SIZE + QUEUE_SIZE/2; i++) {
58-
msg.type = i;
59-
msg.content.ptr = (void *) i;
60+
msg = (msg_t) {
61+
.type = i,
62+
.content.ptr = (void *)i,
63+
};
6064
msg_send_to_self(&msg);
6165
}
6266

0 commit comments

Comments
 (0)