]> git.ipfire.org Git - location/libloc.git/commitdiff
database: Fix checking pointer
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 19 Oct 2019 10:53:34 +0000 (11:53 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 19 Oct 2019 10:53:34 +0000 (11:53 +0100)
This always evaluated to true which is not what was intended here.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/database.c

index 3439b1534dbb30872f6226986ac8f5e6dd1980c2..5d808fe5ca9e93484982304a24001aab21994e87 100644 (file)
@@ -921,7 +921,7 @@ LOC_EXPORT int loc_database_enumerator_next_network(
                        // Check if we are interested in this network
 
                        // Skip if the country code does not match
-                       if (enumerator->country_code &&
+                       if (*enumerator->country_code &&
                                        !loc_network_match_country_code(*network, enumerator->country_code)) {
                                loc_network_unref(*network);
                                *network = NULL;