eiwd

no dbus iwd with iwctl functionality
git clone https://git.daat.foo/repos/eiwd.git
Log | Files | Refs | Submodules | README | LICENSE

commit 4577ee01f2510ee565bec20f1d23ff8dc3da05d5
parent 88d0a6a7c07023293c1d57f304e0e39ac138bd80
Author: James Prestwood <prestwoj@gmail.com>
Date:   Mon, 15 Mar 2021 12:15:28 -0700

network: replace l_queue_get_entries loop

After adding network_bss_update, network now has a match_addr
queue function which can be used to replace an unneeded
l_queue_get_entries loop with l_queue_find.

Diffstat:
Msrc/network.c | 12+-----------
1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/src/network.c b/src/network.c @@ -712,17 +712,7 @@ struct scan_bss *network_bss_list_pop(struct network *network) struct scan_bss *network_bss_find_by_addr(struct network *network, const uint8_t *addr) { - const struct l_queue_entry *bss_entry; - - for (bss_entry = l_queue_get_entries(network->bss_list); bss_entry; - bss_entry = bss_entry->next) { - struct scan_bss *bss = bss_entry->data; - - if (!memcmp(bss->addr, addr, sizeof(bss->addr))) - return bss; - } - - return NULL; + return l_queue_find(network->bss_list, match_addr, addr); } static bool match_bss(const void *a, const void *b)