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

nanocoap: allow token to be const in coap_build_hdr()

This commit is contained in:
Benjamin Valentin 2024-03-22 16:02:45 +01:00
parent 9f51daeb53
commit 6154c1270d
2 changed files with 2 additions and 2 deletions

View File

@ -1935,7 +1935,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));