From: Michael Tremer Date: Wed, 6 Mar 2024 22:46:44 +0000 (+0000) Subject: tree: Don't check if we need to fill the stack X-Git-Tag: 0.9.18~100 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=98f1e76c56757b84d3de5f34471de096a8f41f26;p=location%2Flibloc.git tree: Don't check if we need to fill the stack If the stack is empty, the for loop won't run and we will straight go to where we push the network onto the stack. Signed-off-by: Michael Tremer --- diff --git a/src/network-tree.c b/src/network-tree.c index fcc4239..7096625 100644 --- a/src/network-tree.c +++ b/src/network-tree.c @@ -488,10 +488,6 @@ static int loc_network_tree_dedup_step(struct loc_network* network, void* data) struct loc_network* n = NULL; int r; - // First call when we have not seen any networks, yet - if (loc_network_list_empty(ctx->stack)) - return loc_network_list_push(ctx->stack, network); - // Walk through all networks on the stack... for (int i = loc_network_list_size(ctx->stack) - 1; i >= 0; i--) { n = loc_network_list_get(ctx->stack, i);