From 034c78d51cb06d9d9815f2af95be442f5b2898af Mon Sep 17 00:00:00 2001 From: Ken Bannister <kb2ma@runbox.com> Date: Thu, 22 Nov 2018 18:08:50 -0500 Subject: [PATCH] net/gcoap: move macros to implementation file --- sys/include/net/gcoap.h | 24 ------------------------ sys/net/application_layer/gcoap/gcoap.c | 9 +++++++++ 2 files changed, 9 insertions(+), 24 deletions(-) diff --git a/sys/include/net/gcoap.h b/sys/include/net/gcoap.h index ffa1938e79..92b221fdec 100644 --- a/sys/include/net/gcoap.h +++ b/sys/include/net/gcoap.h @@ -252,30 +252,6 @@ extern "C" { #define GCOAP_PDU_BUF_SIZE (128) #endif -/** - * @brief Reduce payload length by this value for a request created with - * gcoap_req_init() - * - * Accommodates writing Content-Format option in gcoap_finish() - */ -#define GCOAP_REQ_OPTIONS_BUF (4) - -/** - * @brief Reduce payload length by this value for a respons created with - * gcoap_resp_init() - * - * Accommodates writing Content-Format option in gcoap_finish() - */ -#define GCOAP_RESP_OPTIONS_BUF (4) - -/** - * @brief Reduce payload length by this value for an observe notification - * created with gcoap_obs_init() - * - * Accommodates writing Content-Format option in gcoap_finish() - */ -#define GCOAP_OBS_OPTIONS_BUF (4) - /** * @brief Maximum number of requests awaiting a response */ diff --git a/sys/net/application_layer/gcoap/gcoap.c b/sys/net/application_layer/gcoap/gcoap.c index 192ecb71c2..c4d64acd60 100644 --- a/sys/net/application_layer/gcoap/gcoap.c +++ b/sys/net/application_layer/gcoap/gcoap.c @@ -38,6 +38,15 @@ #define GCOAP_RESOURCE_WRONG_METHOD -1 #define GCOAP_RESOURCE_NO_PATH -2 +/* + * Reduce payload length by this value for a request created with + * gcoap_req_init(), gcoap_resp_init(), and gcoap_obs_init(), respectively. + * Accommodates writing Content-Format option in gcoap_finish(). + */ +#define GCOAP_REQ_OPTIONS_BUF (4) +#define GCOAP_RESP_OPTIONS_BUF (4) +#define GCOAP_OBS_OPTIONS_BUF (4) + /* Internal functions */ static void *_event_loop(void *arg); static void _listen(sock_udp_t *sock); -- GitLab