[riot-notifications] [RIOT-OS/RIOT] gnrc_pkt: port to list.h (#15342)
Martine Lenders
notifications at github.com
Tue Nov 3 13:09:21 CET 2020
@miri64 commented on this pull request.
> + list_node_t list = { .next = (list_node_t *)pkt };
+
+ list_remove(&list, (list_node_t *)snip);
+ return (gnrc_pktsnip_t *)list.next;
If `list` is so confusing, should I maybe replace this with
```suggestion
if (snip == pkt) {
return pkt->next;
}
else {
gnrc_pktsnip_t *prev = gnrc_pkt_prev_snip(pkt, snip);
if (prev) {
prev->next = snip->next;
}
return pkt;
}
```
?
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/15342#pullrequestreview-522433373
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20201103/094646aa/attachment.htm>
More information about the notifications
mailing list