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

nanocoap: don't set type & code twice in coap_build_reply()

This commit is contained in:
Benjamin Valentin 2024-01-16 19:22:23 +01:00
parent 879d312960
commit 2c232dd0d2

View File

@ -675,9 +675,6 @@ ssize_t coap_build_reply(coap_pkt_t *pkt, unsigned code,
coap_build_hdr((coap_hdr_t *)rbuf, type, coap_get_token(pkt), tkl, code,
ntohs(pkt->hdr->id));
coap_hdr_set_type((coap_hdr_t *)rbuf, type);
coap_hdr_set_code((coap_hdr_t *)rbuf, code);
len += payload_len;
return len;