]> git.ipfire.org Git - location/libloc.git/commitdiff
database: Read the first element from the list
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 24 Nov 2020 15:22:02 +0000 (15:22 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 24 Nov 2020 15:22:02 +0000 (15:22 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/database.c

index f1f6ae0cd11336d5965cf5b2aadeac2baf071856..914ed3eb6e55abb6c19864c7881899e56e102b70 100644 (file)
@@ -1191,7 +1191,7 @@ static int __loc_database_enumerator_next_network(
                struct loc_database_enumerator* enumerator, struct loc_network** network, int filter) {
        // Return top element from the stack
        while (1) {
-               *network = loc_network_list_pop(enumerator->stack);
+               *network = loc_network_list_pop_first(enumerator->stack);
 
                // Stack is empty
                if (!*network)