]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c
MdeModulePkg/DxeIpIoLib: Fixed the error ASSERT incorrectly used in IpIoAddIp().
[mirror_edk2.git] / MdeModulePkg / Library / DxeIpIoLib / DxeIpIoLib.c
index 0c6681d9d58edce947ddafd401ac4ad0e0d76318..66c7fec6c54820b455603a8cb0b01648c78e9055 100644 (file)
@@ -1742,12 +1742,12 @@ IpIoAddIp (
   EFI_EVENT      Event;\r
 \r
   ASSERT (IpIo != NULL);\r
+  ASSERT ((IpIo->IpVersion == IP_VERSION_4) || (IpIo->IpVersion == IP_VERSION_6));\r
 \r
   IpInfo = AllocatePool (sizeof (IP_IO_IP_INFO));\r
   if (IpInfo == NULL) {\r
     return NULL;\r
   }\r
-  ASSERT ((IpInfo->IpVersion == IP_VERSION_4) || (IpInfo->IpVersion == IP_VERSION_6));\r
 \r
   //\r
   // Init this IpInfo, set the Addr and SubnetMask to 0 before we configure the IP\r