]> git.ipfire.org Git - location/libloc.git/blobdiff - src/network.c
Make sources around that we can run tests without location installed
[location/libloc.git] / src / network.c
index 98c7558b2b3e7ef3fd09297728d3ed80a9f916af..37a483eaf0b33b32406bd87e9adc8445fa84fdfa 100644 (file)
@@ -312,7 +312,7 @@ LOC_EXPORT int loc_network_subnets(struct loc_network* network,
        *subnet2 = NULL;
 
        // New prefix length
-       unsigned int prefix = network->prefix + 1;
+       unsigned int prefix = loc_network_prefix(network) + 1;
 
        // Check if the new prefix is valid
        if (!loc_address_valid_prefix(&network->first_address, prefix)) {