Commit d3740094 authored by Ondřej Surý's avatar Ondřej Surý
Browse files

named: remove named_g_defaultdnstap global variable

The named_g_defaultdnstap was never used as the dnstap requires
explicit configuration of the output file.

Related scan-build report:

./server.c:3476:14: warning: Value stored to 'dpath' during its initialization is never read
        const char *dpath = named_g_defaultdnstap;
                    ^~~~~   ~~~~~~~~~~~~~~~~~~~~~
1 warning generated.

(cherry picked from commit 6decd145)
parent 9d088216
......@@ -150,14 +150,6 @@ EXTERN const char * lwresd_g_defaultpidfile INIT(NS_LOCALSTATEDIR
"/run/lwresd.pid");
#endif
#ifdef HAVE_DNSTAP
EXTERN const char * ns_g_defaultdnstap
INIT(NS_LOCALSTATEDIR "/run/named/"
"dnstap.sock");
#else
EXTERN const char * ns_g_defaultdnstap INIT(NULL);
#endif /* HAVE_DNSTAP */
EXTERN const char * ns_g_username INIT(NULL);
#if defined(USE_PKCS11)
......
......@@ -3050,7 +3050,7 @@ configure_dnstap(const cfg_obj_t **maps, dns_view_t *view) {
isc_result_t result;
const cfg_obj_t *obj, *obj2;
const cfg_listelt_t *element;
const char *dpath = ns_g_defaultdnstap;
const char *dpath;
const cfg_obj_t *dlist = NULL;
dns_dtmsgtype_t dttypes = 0;
dns_dtmode_t dmode;
......
......@@ -63,7 +63,6 @@ ns_paths_init(void) {
ns_g_defaultlockfile = isc_ntpaths_get(NAMED_LOCK_PATH);
ns_g_keyfile = isc_ntpaths_get(RNDC_KEY_PATH);
ns_g_defaultsessionkeyfile = isc_ntpaths_get(SESSION_KEY_PATH);
ns_g_defaultdnstap = NULL;
Initialized = TRUE;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment