diff --git a/sys/include/net/nanocoap.h b/sys/include/net/nanocoap.h index ab2b350240..5e3ffb4b9a 100644 --- a/sys/include/net/nanocoap.h +++ b/sys/include/net/nanocoap.h @@ -175,7 +175,7 @@ extern "C" { /** * @brief Nanocoap-specific value to indicate no format specified */ -#define COAP_FORMAT_NONE (65535) +#define COAP_FORMAT_NONE (UINT16_MAX) /** * @name Nanocoap specific maximum values diff --git a/sys/net/application_layer/gcoap/gcoap.c b/sys/net/application_layer/gcoap/gcoap.c index ac0f770337..fe7236e6f4 100644 --- a/sys/net/application_layer/gcoap/gcoap.c +++ b/sys/net/application_layer/gcoap/gcoap.c @@ -38,6 +38,12 @@ #define GCOAP_RESOURCE_WRONG_METHOD -1 #define GCOAP_RESOURCE_NO_PATH -2 +/* + * gcoap internal Content-Format option value. Not intended for use in a + * transmitted packet. Must be a 3-byte unsigned value. + */ +#define COAP_FORMAT_NO_PAYLOAD (UINT16_MAX + 1) + /* Internal functions */ static void *_event_loop(void *arg); static void _listen(sock_udp_t *sock);