From 98f1e76c56757b84d3de5f34471de096a8f41f26 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Wed, 6 Mar 2024 22:46:44 +0000 Subject: [PATCH] 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 --- src/network-tree.c | 4 ---- 1 file changed, 4 deletions(-) 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); -- 2.39.5