mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
nanocoap: constify helper functions
This commit is contained in:
parent
e3f9252947
commit
21cba5771d
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user