[riot-notifications] [RIOT-OS/RIOT] core/clist: add special cardinality tests and matching unittest (#16330)

Karl Fessel notifications at github.com
Wed Apr 14 17:07:08 CEST 2021


@kfessel commented on this pull request.



> @@ -466,6 +468,38 @@ static inline size_t clist_count(clist_node_t *list)
     return cnt;
 }
 
+/**
+ * @brief   Tells if a list has exactly one element
+ *
+ * @note    Complexity: O(1)
+ *
+ * @param[in]   list    Pointer to the clist
+ *
+ * @return      Cardinality == 1 information

about RIOT:
```
RIOT$ rg @return |wc -l
6278
RIOT$ rg @returns |wc -l
448
```
the first includes the second so its about 14:1

-- 
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/16330#discussion_r613333069
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210414/91037cb0/attachment.htm>


More information about the notifications mailing list