[riot-notifications] [RIOT-OS/RIOT] gnrc_netreg: bail out if type is not registered (#16629)

Martine Lenders notifications at github.com
Thu Jul 8 16:54:57 CEST 2021


@miri64 commented on this pull request.



> @@ -95,7 +95,9 @@ static gnrc_netreg_entry_t *_netreg_lookup(gnrc_netreg_entry_t *from,
 
     if (from || !_INVALID_TYPE(type)) {
         gnrc_netreg_entry_t *head = (from) ? from->next : netreg[type];
-        LL_SEARCH_SCALAR(head, res, demux_ctx, demux_ctx);
+        if (head) {
+            LL_SEARCH_SCALAR(head, res, demux_ctx, demux_ctx);

IIRC `LL_SEARCH_SCALAR` should cover an empty list (`head == NULL`). So what happened there?

-- 
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/16629#pullrequestreview-702169134
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210708/40fadc52/attachment.htm>


More information about the notifications mailing list