From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.43, mailfrom: wei6.xu@intel.com) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by groups.io with SMTP; Tue, 13 Aug 2019 03:53:30 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Aug 2019 03:53:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,381,1559545200"; d="scan'208";a="351501769" Received: from shwdeopenpsi174.ccr.corp.intel.com ([10.239.157.39]) by orsmga005.jf.intel.com with ESMTP; 13 Aug 2019 03:53:28 -0700 From: "Xu, Wei6" To: devel@edk2.groups.io Cc: Hao A Wu , Liming Gao Subject: [edk2-devel][Patch] MdeModulePkg/CapsuleApp: Improve comparisons in CapsuleOnDisk.c Date: Tue, 13 Aug 2019 18:53:17 +0800 Message-Id: <20190813105317.2820-1-wei6.xu@intel.com> X-Mailer: git-send-email 2.16.2.windows.1 BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2028 Non-Boolean comparisons should use a compare operator (==, !=, >, < >=, <=). Cc: Hao A Wu Cc: Liming Gao Signed-off-by: Wei6 Xu --- MdeModulePkg/Application/CapsuleApp/CapsuleOnDisk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MdeModulePkg/Application/CapsuleApp/CapsuleOnDisk.c b/MdeModulePkg/Application/CapsuleApp/CapsuleOnDisk.c index 382efa9aa0..b161d1a981 100644 --- a/MdeModulePkg/Application/CapsuleApp/CapsuleOnDisk.c +++ b/MdeModulePkg/Application/CapsuleApp/CapsuleOnDisk.c @@ -742,11 +742,11 @@ IsCapsuleOnDiskSupported ( ); if (EFI_ERROR (Status)) { return FALSE; } - if (OsIndicationsSupported & EFI_OS_INDICATIONS_FILE_CAPSULE_DELIVERY_SUPPORTED) { + if ((OsIndicationsSupported & EFI_OS_INDICATIONS_FILE_CAPSULE_DELIVERY_SUPPORTED) != 0) { return TRUE; } return FALSE; } -- 2.16.2.windows.1