nanocoap: add const qualifier to pkt of coap_opt_get_opaque()

This commit is contained in:
Cenk Gündoğan 2020-03-25 13:38:21 +01:00
parent 1c7903287a
commit 5e42e26a6e
2 changed files with 2 additions and 2 deletions

View File

@ -597,7 +597,7 @@ ssize_t coap_opt_get_next(const coap_pkt_t *pkt, coap_optpos_t *opt,
* @return -ENOENT if option not found
* @return -EINVAL if option cannot be parsed
*/
ssize_t coap_opt_get_opaque(coap_pkt_t *pkt, unsigned opt_num, uint8_t **value);
ssize_t coap_opt_get_opaque(const coap_pkt_t *pkt, unsigned opt_num, uint8_t **value);
/**@}*/

View File

@ -206,7 +206,7 @@ static uint8_t *_parse_option(const coap_pkt_t *pkt,
return pkt_pos;
}
ssize_t coap_opt_get_opaque(coap_pkt_t *pkt, unsigned opt_num, uint8_t **value)
ssize_t coap_opt_get_opaque(const coap_pkt_t *pkt, unsigned opt_num, uint8_t **value)
{
uint8_t *start = coap_find_option(pkt, opt_num);
if (!start) {