From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: wei6.xu@intel.com) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by groups.io with SMTP; Tue, 13 Aug 2019 03:53:55 -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 orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Aug 2019 03:53:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,381,1559545200"; d="scan'208";a="351501839" Received: from shwdeopenpsi174.ccr.corp.intel.com ([10.239.157.39]) by orsmga005.jf.intel.com with ESMTP; 13 Aug 2019 03:53:53 -0700 From: "Xu, Wei6" To: devel@edk2.groups.io Cc: Hao A Wu , Liming Gao Subject: [edk2-devel][Patch] MdeModulePkg/DxeCapsuleLibFmp: Improve comparisons in CapsuleOnDisk.c Date: Tue, 13 Aug 2019 18:53:49 +0800 Message-Id: <20190813105349.7312-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/Library/DxeCapsuleLibFmp/CapsuleOnDisk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MdeModulePkg/Library/DxeCapsuleLibFmp/CapsuleOnDisk.c b/MdeModulePkg/Library/DxeCapsuleLibFmp/CapsuleOnDisk.c index 3193ca8f4d..4c32c6cdcf 100644 --- a/MdeModulePkg/Library/DxeCapsuleLibFmp/CapsuleOnDisk.c +++ b/MdeModulePkg/Library/DxeCapsuleLibFmp/CapsuleOnDisk.c @@ -125,11 +125,11 @@ UpperCaseString ( IN CHAR16 *Str ) { CHAR16 *Cptr; - for (Cptr = Str; *Cptr; Cptr++) { + for (Cptr = Str; *Cptr != L'\0'; Cptr++) { if (L'a' <= *Cptr && *Cptr <= L'z') { *Cptr = *Cptr - L'a' + L'A'; } } -- 2.16.2.windows.1