]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/DxeCapsuleLibFmp: Improve comparisons in CapsuleOnDisk.c
authorXu, Wei6 <wei6.xu@intel.com>
Tue, 13 Aug 2019 10:53:49 +0000 (18:53 +0800)
committerHao A Wu <hao.a.wu@intel.com>
Thu, 15 Aug 2019 01:10:57 +0000 (09:10 +0800)
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2028

Non-Boolean comparisons should use a compare operator
(==, !=, >, < >=, <=).

Signed-off-by: Wei6 Xu <wei6.xu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
MdeModulePkg/Library/DxeCapsuleLibFmp/CapsuleOnDisk.c

index 3193ca8f4d6ff0147de0f49327126b5695fee9e0..4c32c6cdcf37e16bdb34fc7c00e7cafbb200c5b6 100644 (file)
@@ -127,7 +127,7 @@ UpperCaseString (
 {\r
   CHAR16  *Cptr;\r
 \r
-  for (Cptr = Str; *Cptr; Cptr++) {\r
+  for (Cptr = Str; *Cptr != L'\0'; Cptr++) {\r
     if (L'a' <= *Cptr && *Cptr <= L'z') {\r
       *Cptr = *Cptr - L'a' + L'A';\r
     }\r