Commit 2d52a05f 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 72f9846b
...@@ -135,14 +135,6 @@ EXTERN const char * named_g_defaultpidfile INIT(NAMED_LOCALSTATEDIR ...@@ -135,14 +135,6 @@ EXTERN const char * named_g_defaultpidfile INIT(NAMED_LOCALSTATEDIR
"/run/named.pid"); "/run/named.pid");
#endif #endif
#ifdef HAVE_DNSTAP
EXTERN const char * named_g_defaultdnstap
INIT(NAMED_LOCALSTATEDIR "/run/named/"
"dnstap.sock");
#else
EXTERN const char * named_g_defaultdnstap INIT(NULL);
#endif /* HAVE_DNSTAP */
EXTERN const char * named_g_username INIT(NULL); EXTERN const char * named_g_username INIT(NULL);
EXTERN const char * named_g_engine INIT(NULL); EXTERN const char * named_g_engine INIT(NULL);
......
...@@ -3485,7 +3485,7 @@ configure_dnstap(const cfg_obj_t **maps, dns_view_t *view) { ...@@ -3485,7 +3485,7 @@ configure_dnstap(const cfg_obj_t **maps, dns_view_t *view) {
isc_result_t result; isc_result_t result;
const cfg_obj_t *obj, *obj2; const cfg_obj_t *obj, *obj2;
const cfg_listelt_t *element; const cfg_listelt_t *element;
const char *dpath = named_g_defaultdnstap; const char *dpath;
const cfg_obj_t *dlist = NULL; const cfg_obj_t *dlist = NULL;
dns_dtmsgtype_t dttypes = 0; dns_dtmsgtype_t dttypes = 0;
unsigned int i; unsigned int i;
......
...@@ -60,7 +60,6 @@ named_paths_init(void) { ...@@ -60,7 +60,6 @@ named_paths_init(void) {
named_g_keyfile = isc_ntpaths_get(RNDC_KEY_PATH); named_g_keyfile = isc_ntpaths_get(RNDC_KEY_PATH);
named_g_defaultsessionkeyfile = isc_ntpaths_get(SESSION_KEY_PATH); named_g_defaultsessionkeyfile = isc_ntpaths_get(SESSION_KEY_PATH);
named_g_defaultbindkeys = isc_ntpaths_get(BIND_KEYS_PATH); named_g_defaultbindkeys = isc_ntpaths_get(BIND_KEYS_PATH);
named_g_defaultdnstap = NULL;
Initialized = TRUE; 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