From a36f89341f4e5e7d2c475554a4ae000143bffee5 Mon Sep 17 00:00:00 2001 From: Mukund Sivaraman Date: Wed, 18 Apr 2018 09:44:20 -0700 Subject: [PATCH] Remove bogus comparison (cherry picked from commit 89cf503880c4e2d24477b9d9be6e1b0de964ea0d) --- CHANGES | 3 +++ bin/dig/nslookup.c | 22 +++++++++++----------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/CHANGES b/CHANGES index 6765a22ef3..33a4a5ee87 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +4930. [bug] Remove a bogus check in nslookup command line + argument processing. [GL #206] + 4922. [bug] dnstap: Log the destination address of client packets rather than the interface address. [GL #197] diff --git a/bin/dig/nslookup.c b/bin/dig/nslookup.c index ebb850209c..9bdc0a897c 100644 --- a/bin/dig/nslookup.c +++ b/bin/dig/nslookup.c @@ -709,31 +709,31 @@ setoption(char *opt) { usesearch = ISC_TRUE; } else if (CHECKOPT("nodefname", 5)) { usesearch = ISC_FALSE; - } else if (CHECKOPT("vc", 2) == 0) { + } else if (CHECKOPT("vc", 2)) { tcpmode = ISC_TRUE; tcpmode_set = ISC_TRUE; - } else if (CHECKOPT("novc", 4) == 0) { + } else if (CHECKOPT("novc", 4)) { tcpmode = ISC_FALSE; tcpmode_set = ISC_TRUE; - } else if (CHECKOPT("debug", 3) == 0) { + } else if (CHECKOPT("debug", 3)) { short_form = ISC_FALSE; showsearch = ISC_TRUE; - } else if (CHECKOPT("nodebug", 5) == 0) { + } else if (CHECKOPT("nodebug", 5)) { short_form = ISC_TRUE; showsearch = ISC_FALSE; - } else if (CHECKOPT("d2", 2) == 0) { + } else if (CHECKOPT("d2", 2)) { debugging = ISC_TRUE; - } else if (CHECKOPT("nod2", 4) == 0) { + } else if (CHECKOPT("nod2", 4)) { debugging = ISC_FALSE; - } else if (CHECKOPT("search", 3) == 0) { + } else if (CHECKOPT("search", 3)) { usesearch = ISC_TRUE; - } else if (CHECKOPT("nosearch", 5) == 0) { + } else if (CHECKOPT("nosearch", 5)) { usesearch = ISC_FALSE; - } else if (CHECKOPT("sil", 3) == 0) { + } else if (CHECKOPT("sil", 3)) { /* deprecation_msg = ISC_FALSE; */ - } else if (CHECKOPT("fail", 3) == 0) { + } else if (CHECKOPT("fail", 3)) { nofail=ISC_FALSE; - } else if (CHECKOPT("nofail", 5) == 0) { + } else if (CHECKOPT("nofail", 5)) { nofail=ISC_TRUE; } else if (strncasecmp(opt, "ndots=", 6) == 0) { set_ndots(&opt[6]);