[edk2] [PATCH 3/7] MdeModulePkg/UdfDxe: Use compare operator for non-boolean comparisons

Hao Wu posted 7 patches 7 years, 3 months ago
[edk2] [PATCH 3/7] MdeModulePkg/UdfDxe: Use compare operator for non-boolean comparisons
Posted by Hao Wu 7 years, 3 months ago
Cc: Paulo Alcantara <pcacjr@zytor.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
---
 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.12.0.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel