[riot-notifications] [RIOT-OS/RIOT] ble/nimble: add scanlist submodule (#11278)

Hauke Petersen notifications at github.com
Wed Mar 27 16:24:03 CET 2019

haukepetersen commented on this pull request.

> +    if (ble_addr_cmp(&e->addr, addr) == 0) {
+        return 1;
+    }
+    return 0;
+static nimble_scanlist_entry_t *_find(const ble_addr_t *addr)
+    return (nimble_scanlist_entry_t *)clist_foreach(&_list, _finder,
+                                                    (void *)addr);
+void nimble_scanlist_init(void)
+    for (unsigned i = 0; i < (sizeof(_mem) / sizeof(_mem[0])); i++) {
+        clist_rpush(&_pool, &_mem[i].node);

True, that would be a possibility in general. But in this particular case this is not an issue, as items are only taken from the pool, and the only operation to put them back is by calling clear(), so not really a high chance of loosing an item anywhere.

Hope you can live with this for now. At some point, we might as well look into how we can add unittest to these submodules in a nice way - lets see if this submodules survives until then :-)

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/20190327/de72d4a0/attachment.html>

More information about the notifications mailing list