]> git.ipfire.org Git - location/libloc.git/commitdiff
Fix evaluation that always is true
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 12 Jan 2019 16:09:35 +0000 (16:09 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 12 Jan 2019 16:25:01 +0000 (16:25 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/network.c

index cf396473e835ce2a577dec1579105021ea1b15c6..0c2b260f31487989180e19fe52d4128c2494ec5f 100644 (file)
@@ -318,7 +318,7 @@ LOC_EXPORT int loc_network_set_asn(struct loc_network* network, uint32_t asn) {
 LOC_EXPORT int loc_network_to_database_v0(struct loc_network* network, struct loc_database_network_v0* dbobj) {
        // Add country code
        for (unsigned int i = 0; i < 2; i++) {
-               dbobj->country_code[i] = network->country_code ? network->country_code[i] : '\0';
+               dbobj->country_code[i] = network->country_code[i] ? network->country_code[i] : '\0';
        }
 
        // Add ASN