]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
named: remove named_g_defaultdnstap global variable
authorOndřej Surý <ondrej@sury.org>
Thu, 31 Oct 2019 11:46:32 +0000 (06:46 -0500)
committerOndřej Surý <ondrej@sury.org>
Tue, 5 Nov 2019 08:52:52 +0000 (09:52 +0100)
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 6decd145926387347216f5a9ecbf8ca4593d11be)

bin/named/include/named/globals.h
bin/named/server.c
bin/named/win32/os.c

index eda2214363e46a693c8941cb2fb72a4aad21f941..7d24c39fcaf139395e17de08ee64a0652ad460ce 100644 (file)
@@ -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)
index b5f164eebb13e0988ff32c1ad52535ba341786ea..e0ac11dda02ee4d7fc2e66ef03a381c8a786bc2f 100644 (file)
@@ -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;
index f74bb57bb1777c36192f560c47429718110f6dbf..34be311b661df5a17c1a275cf2d554c236d873d3 100644 (file)
@@ -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;
 }