]> git.ipfire.org Git - people/ms/libloc.git/blobdiff - src/database.c
Remove some dead code and add some comments
[people/ms/libloc.git] / src / database.c
index 37a44e5e37aa21a14db8e75ed1374c203078a951..710fa5641fe37c5708d6bb831111d9354fdb66c6 100644 (file)
@@ -725,12 +725,10 @@ static int loc_database_enumerator_network_depth_first_search(
                        continue;
                }
 
+               // Mark the bits on the path correctly
                in6_addr_set_bit(&e->network_address,
                        (node->depth > 0) ? node->depth - 1 : 0, node->i);
 
-               //for (unsigned int i = stack->depth + 1; i < 128; i++)
-               //      in6_addr_set_bit(&e->network_address, i, 0);
-
                DEBUG(e->ctx, "Looking at node %jd\n", node->offset);
                e->networks_visited[node->offset]++;
 
@@ -778,7 +776,10 @@ static int loc_database_enumerator_network_depth_first_search(
        }
 
        // Reached the end of the search
-       // TODO cleanup
+
+       // Mark all nodes as non-visited
+       for (unsigned int i = 0; i < e->db->network_nodes_count; i++)
+               e->networks_visited[i] = 0;
 
        return 0;
 }