From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.20; helo=mga02.intel.com; envelope-from=jiaxin.wu@intel.com; receiver=edk2-devel@lists.01.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 94F6F20356261 for ; Mon, 4 Dec 2017 22:55:01 -0800 (PST) Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Dec 2017 22:59:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,363,1508828400"; d="scan'208";a="157575" Received: from jiaxinwu-mobl2.ccr.corp.intel.com ([10.239.196.96]) by orsmga008.jf.intel.com with ESMTP; 04 Dec 2017 22:59:30 -0800 From: Jiaxin Wu To: edk2-devel@lists.01.org Cc: Ye Ting , Fu Siyuan , Wang Fan , Wu Jiaxin Date: Tue, 5 Dec 2017 14:59:19 +0800 Message-Id: <1512457162-9296-2-git-send-email-jiaxin.wu@intel.com> X-Mailer: git-send-email 1.9.5.msysgit.1 In-Reply-To: <1512457162-9296-1-git-send-email-jiaxin.wu@intel.com> References: <1512457162-9296-1-git-send-email-jiaxin.wu@intel.com> Subject: [Patch 1/4] NetworkPkg/DnsDxe: Remove the unnecessary if condition check in DNS.Config X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2017 06:55:01 -0000 Cc: Ye Ting Cc: Fu Siyuan Cc: Wang Fan Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin --- NetworkPkg/DnsDxe/DnsProtocol.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NetworkPkg/DnsDxe/DnsProtocol.c b/NetworkPkg/DnsDxe/DnsProtocol.c index bd189ae..7435607 100644 --- a/NetworkPkg/DnsDxe/DnsProtocol.c +++ b/NetworkPkg/DnsDxe/DnsProtocol.c @@ -254,11 +254,11 @@ Dns4Configure ( Status = Dns4CopyConfigure (&Instance->Dns4CfgData, DnsConfigData); if (EFI_ERROR (Status)) { goto ON_EXIT; } - if (DnsConfigData->DnsServerListCount == 0 || DnsConfigData->DnsServerList == NULL) { + if (DnsConfigData->DnsServerListCount == 0) { gBS->RestoreTPL (OldTpl); // // The DNS instance will retrieve DNS server from DHCP Server // @@ -1076,11 +1076,11 @@ Dns6Configure ( Status = Dns6CopyConfigure (&Instance->Dns6CfgData, DnsConfigData); if (EFI_ERROR (Status)) { goto ON_EXIT; } - if (DnsConfigData->DnsServerCount == 0 || DnsConfigData->DnsServerList == NULL) { + if (DnsConfigData->DnsServerCount == 0) { gBS->RestoreTPL (OldTpl); // //The DNS instance will retrieve DNS server from DHCP Server. // -- 1.9.5.msysgit.1