]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Get rid of DNS_GEOIP_DATABASE_INIT explicit initializer for geoip dbs
authorOndřej Surý <ondrej@sury.org>
Thu, 4 Jul 2019 09:17:16 +0000 (11:17 +0200)
committerEvan Hunt <each@isc.org>
Thu, 4 Jul 2019 15:58:26 +0000 (08:58 -0700)
Instead of the explicit struct initializer with all member, rely on the fact
that static variables are explicitly initialized to 0 if not explicitly
initialized.

bin/named/geoip.c
lib/dns/include/dns/geoip.h
lib/dns/tests/geoip_test.c

index 83fbd96e67ec83bb5e4d4035b055ef36d3e04d3a..5e5d58698616c4c0ef868729596174598fbfb15a 100644 (file)
@@ -24,7 +24,7 @@
 #include <named/log.h>
 #include <named/geoip.h>
 
-static dns_geoip_databases_t geoip_table = DNS_GEOIP_DATABASE_INIT;
+static dns_geoip_databases_t geoip_table;
 
 #if defined(HAVE_GEOIP2)
 static MMDB_s geoip_country, geoip_city, geoip_as, geoip_isp, geoip_domain;
index 0b7a99ec19d51c9377ed5d795cbca5c2daca4466..4dc3291c62bec8f1602b5698516d8bf128f7a77e 100644 (file)
@@ -92,8 +92,6 @@ struct dns_geoip_databases {
        void *domain;           /* GeoIP2-Domain */
        void *isp;              /* GeoIP2-ISP */
        void *as;               /* GeoIP2-ASN or GeoLite2-ASN */
-#define DNS_GEOIP_DATABASE_INIT \
-       { NULL, NULL, NULL, NULL, NULL }
 };
 
 /***
index 317032d6eae18b327d367ecd54013a7c32da0511..2ede4fda012b8aaccb28450863b646aebcbcce44 100644 (file)
@@ -38,7 +38,7 @@
 /* Use GeoIP2 databases from the 'geoip2' system test */
 #define TEST_GEOIP_DATA "../../../bin/tests/system/geoip2/data"
 
-static dns_geoip_databases_t geoip = DNS_GEOIP_DATABASE_INIT;
+static dns_geoip_databases_t geoip;
 
 static MMDB_s geoip_country, geoip_city, geoip_as, geoip_isp, geoip_domain;