mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 00:49:45 +01:00
tests/unittests: use proper initializers for gnrc_pktsnip_t
This commit is contained in:
parent
300a936e42
commit
cb554fd342
@ -325,7 +325,10 @@ static void test_pktbuf_mark__pkt_NOT_NULL__size_greater_than_pkt_size(void)
|
||||
|
||||
static void test_pktbuf_mark__pkt_NOT_NULL__pkt_data_NULL(void)
|
||||
{
|
||||
gnrc_pktsnip_t pkt = { NULL, NULL, sizeof(TEST_STRING16), 1, GNRC_NETTYPE_TEST };
|
||||
gnrc_pktsnip_t pkt = { .size = sizeof(TEST_STRING16),
|
||||
.type = GNRC_NETTYPE_TEST,
|
||||
.users = 1,
|
||||
};
|
||||
|
||||
TEST_ASSERT_NULL(gnrc_pktbuf_mark(&pkt, sizeof(TEST_STRING16) - 1,
|
||||
GNRC_NETTYPE_TEST));
|
||||
|
@ -21,8 +21,8 @@
|
||||
#include "unittests-constants.h"
|
||||
#include "tests-pktqueue.h"
|
||||
|
||||
#define PKT_INIT_ELEM(len, data, next) \
|
||||
{ (next), (void *)(data), (len), 1, GNRC_NETTYPE_UNDEF }
|
||||
#define PKT_INIT_ELEM(len, ptr, nxt) \
|
||||
{ .next = (nxt), .data = (void *)(ptr), .size = (len), .users = 1, .type = GNRC_NETTYPE_UNDEF }
|
||||
#define PKT_INIT_ELEM_STATIC_DATA(data, next) PKT_INIT_ELEM(sizeof(data), (void *)(data), (next))
|
||||
#define PKTQUEUE_INIT_ELEM(pkt) { NULL, pkt }
|
||||
|
||||
|
@ -22,8 +22,8 @@
|
||||
#include "unittests-constants.h"
|
||||
#include "tests-priority_pktqueue.h"
|
||||
|
||||
#define PKT_INIT_ELEM(len, data, next) \
|
||||
{ (next), (void *)(data), (len), 1, GNRC_NETTYPE_UNDEF }
|
||||
#define PKT_INIT_ELEM(len, ptr, nxt) \
|
||||
{ .next = (nxt), .data = (void *)(ptr), .size = (len), .users = 1, .type = GNRC_NETTYPE_UNDEF }
|
||||
#define PKT_INIT_ELEM_STATIC_DATA(data, next) PKT_INIT_ELEM(sizeof(data), (void *)(data), (next))
|
||||
#define PKTQUEUE_INIT_ELEM(pkt) { NULL, pkt }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user