From 33c84591e919dae275db7634d0cca634a1a971cc Mon Sep 17 00:00:00 2001 From: Pekka Nikander <pekka.nikander@iki.fi> Date: Mon, 30 Jul 2018 09:01:30 +0300 Subject: [PATCH] {examples,tests}/gcoap: Remove unnecessary type casts --- examples/gcoap/gcoap_cli.c | 2 +- examples/rdcli_simple/main.c | 2 +- tests/unittests/tests-gcoap/tests-gcoap.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/gcoap/gcoap_cli.c b/examples/gcoap/gcoap_cli.c index f1a2f6fb71..fbb931bf54 100644 --- a/examples/gcoap/gcoap_cli.c +++ b/examples/gcoap/gcoap_cli.c @@ -41,7 +41,7 @@ static const coap_resource_t _resources[] = { }; static gcoap_listener_t _listener = { - (coap_resource_t *)&_resources[0], + &_resources[0], sizeof(_resources) / sizeof(_resources[0]), NULL }; diff --git a/examples/rdcli_simple/main.c b/examples/rdcli_simple/main.c index 48af120856..5931e64376 100644 --- a/examples/rdcli_simple/main.c +++ b/examples/rdcli_simple/main.c @@ -57,7 +57,7 @@ static const coap_resource_t resources[] = { }; static gcoap_listener_t listener = { - .resources = (coap_resource_t *)&resources[0], + .resources = &resources[0], .resources_len = sizeof(resources) / sizeof(resources[0]), .next = NULL }; diff --git a/tests/unittests/tests-gcoap/tests-gcoap.c b/tests/unittests/tests-gcoap/tests-gcoap.c index 03cfa7c307..e519aaf87a 100644 --- a/tests/unittests/tests-gcoap/tests-gcoap.c +++ b/tests/unittests/tests-gcoap/tests-gcoap.c @@ -36,13 +36,13 @@ static const coap_resource_t resources_second[] = { }; static gcoap_listener_t listener = { - .resources = (coap_resource_t *)&resources[0], + .resources = &resources[0], .resources_len = (sizeof(resources) / sizeof(resources[0])), .next = NULL }; static gcoap_listener_t listener_second = { - .resources = (coap_resource_t *)&resources_second[0], + .resources = &resources_second[0], .resources_len = (sizeof(resources_second) / sizeof(resources_second[0])), .next = NULL }; -- GitLab