FatPkg/EnhancedFatDxe: Avoid Non-Boolean type uses as Boolean

Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
This commit is contained in:
Dandan Bi 2016-12-08 13:10:29 +08:00 committed by Ruiyu Ni
parent f42f22f5dd
commit 5163b5f8d1
1 changed files with 2 additions and 2 deletions

View File

@ -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;