The comment for FileHandleIsDirectory in FileHandleLib.h states that "If 
DirHandle is NULL, then ASSERT()." But the instance of UefiFileHandleLib 
returns EFI_INVALID_PARAMETER. The patch makes the comments and the 
implementation consistent.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin....@intel.com>
---
 MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.c 
b/MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.c
index be66c57..724532a 100644
--- a/MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.c
+++ b/MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.c
@@ -385,7 +385,7 @@ FileHandleFlush (
 /**
   function to determine if a given handle is a directory handle
 
-  if DirHandle is NULL then return error
+  if DirHandle is NULL, then ASSERT().
 
   open the file information on the DirHandle and verify that the Attribute
   includes EFI_FILE_DIRECTORY bit set.
@@ -404,9 +404,7 @@ FileHandleIsDirectory (
 {
   EFI_FILE_INFO *DirInfo;
 
-  if (DirHandle == NULL) {
-    return (EFI_INVALID_PARAMETER);
-  }
+  ASSERT (DirHandle != NULL);
 
   //
   // get the file information for DirHandle
-- 
1.9.5.msysgit.1



------------------------------------------------------------------------------
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to