]> git.ipfire.org Git - location/libloc.git/blobdiff - src/test-network.c
network: Allow adding single IP addresses and automatically add the prefix
[location/libloc.git] / src / test-network.c
index 8c7e898f49a69a3ab8bedc19bf85e936217b1e4d..b6776b48be914f6ca75051f63905d93462bd3161 100644 (file)
@@ -170,8 +170,8 @@ int main(int argc, char** argv) {
 
        // Try adding a single address
        err = loc_writer_add_network(writer, &network, "2001:db8::");
-       if (err != -EINVAL) {
-               fprintf(stderr, "It was possible to add an invalid network (err = %d)\n", err);
+       if (err) {
+               fprintf(stderr, "It was impossible to add an single IP address (err = %d)\n", err);
                exit(EXIT_FAILURE);
        }