From: Michael Tremer Date: Sat, 12 Jan 2019 16:09:35 +0000 (+0000) Subject: Fix evaluation that always is true X-Git-Tag: 0.9.0~66 X-Git-Url: http://git.ipfire.org/?p=people%2Fms%2Flibloc.git;a=commitdiff_plain;h=04cdff09f64c940fe3ca057d25872458f2a25852;hp=d42e1dcddc70edba7586c06b0c26dd2ced1e07ff Fix evaluation that always is true Signed-off-by: Michael Tremer --- diff --git a/src/network.c b/src/network.c index cf39647..0c2b260 100644 --- a/src/network.c +++ b/src/network.c @@ -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