]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[v9_9] silence "unused value" warning
authorEvan Hunt <each@isc.org>
Fri, 3 Feb 2017 19:27:19 +0000 (11:27 -0800)
committerEvan Hunt <each@isc.org>
Fri, 3 Feb 2017 19:27:19 +0000 (11:27 -0800)
(cherry picked from commit f4d20b15a2ae52aac9ea8316e546abb61e22ae39)

lib/isc/unix/dir.c

index 66c8d565c3b6c5dde0108eff5b426a22edbc0e8c..8a512cb4bad8a45dbeaa694cb2ae1e19c757d8ae 100644 (file)
@@ -169,6 +169,9 @@ isc_dir_chdir(const char *dirname) {
 
 isc_result_t
 isc_dir_chroot(const char *dirname) {
+#ifdef HAVE_CHROOT
+       void *tmp;
+#endif
 
        REQUIRE(dirname != NULL);
 
@@ -179,7 +182,9 @@ isc_dir_chroot(const char *dirname) {
         * may fail to load library in chroot.
         * Do not report errors if it fails, we do not need any result now.
         */
-       getprotobyname("udp") && getservbyname("domain", "udp");
+       tmp = getprotobyname("udp");
+       if (tmp != NULL)
+               (void) getservbyname("domain", "udp");
 
        if (chroot(dirname) < 0 || chdir("/") < 0)
                return (isc__errno2result(errno));