]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseMemoryLib/CopyMemWrapper.c
Split wrapper functions into separate source files to reduce image code size
[mirror_edk2.git] / MdePkg / Library / BaseMemoryLib / CopyMemWrapper.c
index 155877fdde2b9b55665382eba605959e3785e662..5ca62f50478428426398688c405bb399231eaa7b 100644 (file)
@@ -23,7 +23,7 @@
 \r
 **/\r
 \r
-#include "MemLibWrappers.h"\r
+#include "MemLibInternals.h"\r
 \r
 /**\r
   Copy Length bytes from Source to Destination.\r
@@ -51,8 +51,14 @@ CopyMem (
   IN      UINTN                     Length\r
   )\r
 {\r
-  ASSERT (Length <= MAX_ADDRESS - (UINTN)Destination + 1);\r
-  ASSERT (Length <= MAX_ADDRESS - (UINTN)Source + 1);\r
+  ASSERT (\r
+    Destination == NULL ||\r
+    Length <= MAX_ADDRESS - (UINTN)Destination + 1\r
+    );\r
+  ASSERT (\r
+    Source == NULL ||\r
+    Length <= MAX_ADDRESS - (UINTN)Source + 1\r
+    );\r
   if (Destination == Source || Length == 0) {\r
     return Destination;\r
   }\r