]> git.ipfire.org Git - location/libloc.git/blobdiff - src/test-network.c
Refactor parsing IP addresses
[location/libloc.git] / src / test-network.c
index f27a06ba19c6244e7973823252d305bbcdeb583e..1c49d60658395e5fd10a882f8a41bb9ef4b725f1 100644 (file)
@@ -246,7 +246,7 @@ int main(int argc, char** argv) {
        // Try adding an invalid network
        struct loc_network* network;
        err = loc_writer_add_network(writer, &network, "xxxx:xxxx::/32");
-       if (err != -EINVAL) {
+       if (!err) {
                fprintf(stderr, "It was possible to add an invalid network (err = %d)\n", err);
                exit(EXIT_FAILURE);
        }