]> git.ipfire.org Git - location/libloc.git/commitdiff
network: Fix walking through the tree in order
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 5 Jan 2018 16:44:56 +0000 (16:44 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 5 Jan 2018 16:44:56 +0000 (16:44 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/network.c

index 275897277deb1e8ab4da3cd3fd166ffa99edf1b2..296a354d2e9986f969224350b67e923381ac9985 100644 (file)
@@ -369,9 +369,9 @@ static struct loc_network_tree_node* loc_network_tree_get_node(struct loc_networ
        struct loc_network_tree_node** n;
 
        if (path)
-               n = &node->one;
-       else
                n = &node->zero;
+       else
+               n = &node->one;
 
        // If the desired node doesn't exist, yet, we will create it
        if (*n == NULL) {