]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/UdfDxe: Use compare operator for non-boolean comparisons
authorHao Wu <hao.a.wu@intel.com>
Thu, 14 Sep 2017 02:52:47 +0000 (10:52 +0800)
committerHao Wu <hao.a.wu@intel.com>
Tue, 19 Sep 2017 04:43:55 +0000 (12:43 +0800)
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>
Reviewed-by: Paulo Alcantara <pcacjr@zytor.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c

index f63e7e660b3adc6da5cbebf7d18a370813f3c759..7c83830ec0ea6a945babcb3ed5fa417c1d3a7935 100644 (file)
@@ -1255,7 +1255,7 @@ InternalFindFile (
       BlockIo,\r
       DiskIo,\r
       Volume,\r
-      Parent->FileIdentifierDesc ?\r
+      (Parent->FileIdentifierDesc != NULL) ?\r
       &Parent->FileIdentifierDesc->Icb :\r
       Icb,\r
       Parent->FileEntry,\r
@@ -2117,7 +2117,7 @@ SetFileInfo (
   //\r
   // Calculate the needed size for the EFI_FILE_INFO structure.\r
   //\r
-  FileInfoLength = sizeof (EFI_FILE_INFO) + (FileName ?\r
+  FileInfoLength = sizeof (EFI_FILE_INFO) + ((FileName != NULL) ?\r
                                              StrSize (FileName) :\r
                                              sizeof (CHAR16));\r
   if (*BufferSize < FileInfoLength) {\r