From 12b83f5664a437106a9230d722e43558034aa61e Mon Sep 17 00:00:00 2001 From: Hao Wu Date: Thu, 14 Sep 2017 10:52:47 +0800 Subject: [PATCH] MdeModulePkg/UdfDxe: Use compare operator for non-boolean comparisons Cc: Paulo Alcantara Cc: Ruiyu Ni Cc: Star Zeng Cc: Eric Dong Cc: Dandan Bi Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hao Wu Reviewed-by: Paulo Alcantara Reviewed-by: Star Zeng --- MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c b/MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c index f63e7e660b..7c83830ec0 100644 --- a/MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c +++ b/MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c @@ -1255,7 +1255,7 @@ InternalFindFile ( BlockIo, DiskIo, Volume, - Parent->FileIdentifierDesc ? + (Parent->FileIdentifierDesc != NULL) ? &Parent->FileIdentifierDesc->Icb : Icb, Parent->FileEntry, @@ -2117,7 +2117,7 @@ SetFileInfo ( // // Calculate the needed size for the EFI_FILE_INFO structure. // - FileInfoLength = sizeof (EFI_FILE_INFO) + (FileName ? + FileInfoLength = sizeof (EFI_FILE_INFO) + ((FileName != NULL) ? StrSize (FileName) : sizeof (CHAR16)); if (*BufferSize < FileInfoLength) { -- 2.39.2