1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

nanocoap: make token const in coap_build_hdr()

This commit is contained in:
Benjamin Valentin 2024-01-16 19:21:38 +01:00
parent 42754b58ea
commit 879d312960
2 changed files with 2 additions and 2 deletions

View File

@ -1922,7 +1922,7 @@ ssize_t coap_block2_build_reply(coap_pkt_t *pkt, unsigned code,
*
* @returns length of resulting header
*/
ssize_t coap_build_hdr(coap_hdr_t *hdr, unsigned type, uint8_t *token,
ssize_t coap_build_hdr(coap_hdr_t *hdr, unsigned type, const void *token,
size_t token_len, unsigned code, uint16_t id);
/**

View File

@ -683,7 +683,7 @@ ssize_t coap_build_reply(coap_pkt_t *pkt, unsigned code,
return len;
}
ssize_t coap_build_hdr(coap_hdr_t *hdr, unsigned type, uint8_t *token,
ssize_t coap_build_hdr(coap_hdr_t *hdr, unsigned type, const void *token,
size_t token_len, unsigned code, uint16_t id)
{
assert(!(type & ~0x3));