// 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);
}