Commit
9e72b8a modified the lookup function to return 0 even if no
matches are found. As result, the test case could pass even if the
database lookup did not find any matches.
This commit restores the original intent of the test case, by adding
a failure condition when `network1` is NULL. This is similar to how
the subsequent test case was modified for the inverse condition.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
// Lookup an address in the subnet
err = loc_database_lookup_from_string(db, "2001:db8::", &network1);
- if (err) {
+ if (err || !network1) {
fprintf(stderr, "Could not look up 2001:db8::\n");
exit(EXIT_FAILURE);
}