Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sys/iolist: add helper functions #18044

Merged
merged 5 commits into from
May 3, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
sys/net/grnc: make use of iolist_to_buffer()
  • Loading branch information
benpicco committed May 2, 2022
commit e55f0f88315828aaffeeb70e7900ad329253690c
8 changes: 1 addition & 7 deletions sys/net/gnrc/sock/udp/gnrc_sock_udp.c
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,6 @@ ssize_t sock_udp_sendv_aux(sock_udp_t *sock,
sock_ip_ep_t local;
sock_udp_ep_t remote_cpy;
sock_ip_ep_t *rem;
uint8_t *payload_buf;

assert((sock != NULL) || (remote != NULL));

Expand Down Expand Up @@ -371,12 +370,7 @@ ssize_t sock_udp_sendv_aux(sock_udp_t *sock,
}

/* copy payload data into payload snip */
payload_buf = payload->data;
while (snips) {
memcpy(payload_buf, snips->iol_base, snips->iol_len);
payload_buf += snips->iol_len;
snips = snips->iol_next;
}
iolist_to_buffer(snips, payload->data, payload->size);

pkt = gnrc_udp_hdr_build(payload, src_port, dst_port);
if (pkt == NULL) {
Expand Down