2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-29 05:28:00 +00:00

Get rid of DNS_GEOIP_DATABASE_INIT explicit initializer for geoip dbs

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.
This commit is contained in:
Ondřej Surý 2019-07-04 11:17:16 +02:00 committed by Evan Hunt
parent 1957bcaa99
commit a2e89ff0c1
3 changed files with 2 additions and 4 deletions

View 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;

View 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 }
};
/***

View 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;