[riot-notifications] [RIOT-OS/RIOT] Missing error check of clist_foreach(), mbox_try_put() and msg_try_send() (#15521)

Kaspar Schleiser notifications at github.com
Mon Nov 30 11:12:13 CET 2020

I'll answer the foreach part.
`clist_foreach()` is a generic list traversal tool. Depending on its use, the return value is not relevant.

> clist_foreach(&dev->urc_list, _check_urc, buf);

in this case, a list of "urc" is traversed to find a match using "_check_urc". It is expected to have zero or one matches. So `_check_urc()`, when it finds a match, calls the callback and exits 1, stopping the iteration. The return value of "clist_foreach()" is not needed.

Does that make sense?

@miri64, I'll let you answer the unhandled `msg_try_send()`.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20201130/3a396c48/attachment.htm>

More information about the notifications mailing list