public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Hao Wu <hao.a.wu@intel.com>
To: edk2-devel@lists.01.org
Cc: Hao Wu <hao.a.wu@intel.com>, Paulo Alcantara <pcacjr@zytor.com>,
	Ruiyu Ni <ruiyu.ni@intel.com>, Star Zeng <star.zeng@intel.com>,
	Eric Dong <eric.dong@intel.com>, Dandan Bi <dandan.bi@intel.com>
Subject: [PATCH 3/7] MdeModulePkg/UdfDxe: Use compare operator for non-boolean comparisons
Date: Fri, 15 Sep 2017 12:57:49 +0800	[thread overview]
Message-ID: <20170915045753.588-4-hao.a.wu@intel.com> (raw)
In-Reply-To: <20170915045753.588-1-hao.a.wu@intel.com>

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



  parent reply	other threads:[~2017-09-15  4:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-15  4:57 [PATCH 0/7] MdeModulePkg/Udf: Code refinements Hao Wu
2017-09-15  4:57 ` [PATCH 1/7] MdeModulePkg/UdfDxe: Add checks to ensure no possible NULL ptr deref Hao Wu
2017-09-15  4:57 ` [PATCH 2/7] MdeModulePkg/UdfDxe: Fix operands of different size in bitwise OP Hao Wu
2017-09-15  4:57 ` Hao Wu [this message]
2017-09-15  4:57 ` [PATCH 4/7] MdeModulePkg/Udf: Refine function description comments Hao Wu
2017-09-15  4:57 ` [PATCH 5/7] MdeModulePkg/UdfDxe: Avoid short (single character) variable name Hao Wu
2017-09-15  4:57 ` [PATCH 6/7] MdeModulePkg/Udf: Avoid declaring and initializing local GUID variable Hao Wu
2017-09-15  4:57 ` [PATCH 7/7] MdeModulePkg/UdfDxe: Refine enum member naming style Hao Wu
2017-09-15 21:47 ` [PATCH 0/7] MdeModulePkg/Udf: Code refinements Paulo Alcantara
2017-09-19  3:30   ` Zeng, Star
2017-09-19  3:36     ` Wu, Hao A

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170915045753.588-4-hao.a.wu@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox