]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c
ShellPkg/DmpStore: fix GCC/CLANG build failure
[mirror_edk2.git] / ShellPkg / Library / UefiShellDebug1CommandsLib / Dmem.c
index 7693835b8865739600dd99db003be26d49255a36..42efb4c7d5b251491cc8b3434b184ae10bb4ac32 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Main file for Dmem shell Debug1 function.\r
 \r
-  Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.<BR>\r
   (C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>  \r
   (C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>  \r
   This program and the accompanying materials\r
@@ -31,7 +31,6 @@
   @return A printable character representing Char.\r
 **/\r
 CHAR16\r
-EFIAPI\r
 MakePrintable(\r
   IN CONST CHAR16 Char\r
   )\r
@@ -49,7 +48,6 @@ MakePrintable(
   @param[in] Size       The length of memory to display.\r
 **/\r
 SHELL_STATUS\r
-EFIAPI\r
 DisplayMmioMemory(\r
   IN CONST VOID   *Address,\r
   IN CONST UINTN  Size\r
@@ -68,7 +66,9 @@ DisplayMmioMemory(
     return (SHELL_NOT_FOUND);\r
   }\r
   Buffer = AllocateZeroPool(Size);\r
-  ASSERT(Buffer != NULL);\r
+  if (Buffer == NULL) {\r
+    return SHELL_OUT_OF_RESOURCES;\r
+  }\r
 \r
   Status = PciRbIo->Mem.Read(PciRbIo, EfiPciWidthUint8, (UINT64)(UINTN)Address, Size, Buffer);\r
   if (EFI_ERROR(Status)) {\r