diff --git a/sys/include/net/nanocoap.h b/sys/include/net/nanocoap.h index 88266dc424..91a57f1269 100644 --- a/sys/include/net/nanocoap.h +++ b/sys/include/net/nanocoap.h @@ -324,7 +324,7 @@ static inline uint8_t coap_code(unsigned cls, unsigned detail) * * @returns message code class */ -static inline unsigned coap_get_code_class(coap_pkt_t *pkt) +static inline unsigned coap_get_code_class(const coap_pkt_t *pkt) { return pkt->hdr->code >> 5; } @@ -348,7 +348,7 @@ static inline unsigned coap_get_code_detail(const coap_pkt_t *pkt) * * @returns message code in decimal format */ -static inline unsigned coap_get_code(coap_pkt_t *pkt) +static inline unsigned coap_get_code(const coap_pkt_t *pkt) { return (coap_get_code_class(pkt) * 100) + coap_get_code_detail(pkt); }