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

Merge pull request #20499 from benpicco/coap_build_hdr-const

nanocoap: allow token to be const in coap_build_hdr()
This commit is contained in:
Marian Buschsieweke 2024-03-22 15:35:38 +00:00 committed by GitHub
commit 3d13f1fd19
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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));