From 78ea07d5e752b730f2f07a9d98a17af7f2b521d6 Mon Sep 17 00:00:00 2001 From: Ken Bannister Date: Wed, 21 Aug 2019 06:15:30 -0400 Subject: [PATCH] net/nanocoap: make coap_pkt_t param const --- sys/include/net/nanocoap.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/include/net/nanocoap.h b/sys/include/net/nanocoap.h index 213121fdf3..415df82314 100644 --- a/sys/include/net/nanocoap.h +++ b/sys/include/net/nanocoap.h @@ -325,7 +325,7 @@ static inline unsigned coap_get_id(coap_pkt_t *pkt) * * @returns length of token in the given message (0-8 byte) */ -static inline unsigned coap_get_token_len(coap_pkt_t *pkt) +static inline unsigned coap_get_token_len(const coap_pkt_t *pkt) { return (pkt->hdr->ver_t_tkl & 0xf); } @@ -337,7 +337,7 @@ static inline unsigned coap_get_token_len(coap_pkt_t *pkt) * * @returns total header length */ -static inline unsigned coap_get_total_hdr_len(coap_pkt_t *pkt) +static inline unsigned coap_get_total_hdr_len(const coap_pkt_t *pkt) { return sizeof(coap_hdr_t) + coap_get_token_len(pkt); }