]> git.ipfire.org Git - location/libloc.git/blobdiff - src/test-network.c
network: Implement function to count all nodes
[location/libloc.git] / src / test-network.c
index b309d453ffb61ecf9bb5d7bc4dc4992345dc27fe..665b33836fb291f31a0584fe067b65b450cc1142 100644 (file)
@@ -67,6 +67,9 @@ int main(int argc, char** argv) {
                exit(EXIT_FAILURE);
        }
 
+       size_t nodes = loc_network_tree_count_nodes(tree);
+       printf("The tree has %zu nodes\n", nodes);
+
        // Create a database
        struct loc_writer* writer;
        err = loc_writer_new(ctx, &writer);