]> git.ipfire.org Git - people/ms/libloc.git/blobdiff - src/test-network.c
database: Have the lookup function return 0 even if nothing was found
[people/ms/libloc.git] / src / test-network.c
index 69544e29628bc32febc981ba3fa1f9dbc8dd2a24..9eda47fc5be32c2e1eeaa8437504356c2e40d7a1 100644 (file)
@@ -359,7 +359,7 @@ int main(int argc, char** argv) {
 
        // Lookup an address outside the subnet
        err = loc_database_lookup_from_string(db, "2001:db8:fffe:1::", &network1);
-       if (err == 0) {
+       if (err || network1) {
                fprintf(stderr, "Could look up 2001:db8:fffe:1::, but I shouldn't\n");
                exit(EXIT_FAILURE);
        }