From 5163b5f8d1907f4800a0600adeb53ff640952c00 Mon Sep 17 00:00:00 2001 From: Dandan Bi Date: Thu, 8 Dec 2016 13:10:29 +0800 Subject: FatPkg/EnhancedFatDxe: Avoid Non-Boolean type uses as Boolean Cc: Ruiyu Ni Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi Reviewed-by: Ruiyu Ni --- FatPkg/EnhancedFatDxe/FileName.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'FatPkg') diff --git a/FatPkg/EnhancedFatDxe/FileName.c b/FatPkg/EnhancedFatDxe/FileName.c index 5df403625d..f393aa6357 100644 --- a/FatPkg/EnhancedFatDxe/FileName.c +++ b/FatPkg/EnhancedFatDxe/FileName.c @@ -59,7 +59,7 @@ Returns: PossibleShortName = TRUE; SeparateDot = NULL; SetMem (File8Dot3Name, FAT_NAME_LEN, ' '); - for (TempName = FileName; *TempName; TempName++) { + for (TempName = FileName; *TempName != '\0'; TempName++) { if (*TempName == L'.') { SeparateDot = TempName; } @@ -453,7 +453,7 @@ Returns: UINT8 Sum; Sum = 0; for (ShortNameLen = FAT_NAME_LEN; ShortNameLen != 0; ShortNameLen--) { - Sum = (UINT8)(((Sum & 1) ? 0x80 : 0) + (Sum >> 1) + *ShortNameString++); + Sum = (UINT8)((((Sum & 1) != 0) ? 0x80 : 0) + (Sum >> 1) + *ShortNameString++); } return Sum; -- cgit v1.2.3