From f5892aa8d8bfbe8e6af5c9765faad8cfe877c334 Mon Sep 17 00:00:00 2001 From: "Xu, Wei6" Date: Tue, 13 Aug 2019 18:53:49 +0800 Subject: [PATCH] MdeModulePkg/DxeCapsuleLibFmp: Improve comparisons in CapsuleOnDisk.c BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2028 Non-Boolean comparisons should use a compare operator (==, !=, >, < >=, <=). Signed-off-by: Wei6 Xu Reviewed-by: Liming Gao Reviewed-by: Hao A Wu --- 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 @@ -127,7 +127,7 @@ UpperCaseString ( { 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'; }