]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Remove the assertion which may cause IsDevicePathValid() hang in DEBUG build.
authorRuiyu Ni <ruiyu.ni@intel.com>
Thu, 22 May 2014 07:34:35 +0000 (07:34 +0000)
committerniruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 22 May 2014 07:34:35 +0000 (07:34 +0000)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15544 6f19259b-4bc3-4df7-8a09-765794883524

MdePkg/Library/UefiDevicePathLib/DevicePathUtilities.c

index b48bf02ae8836128bac4b6c77703bcb6091ca9ae..7f21a60380ac5fb800015c69f0f73b34c15c8b6b 100644 (file)
@@ -8,7 +8,7 @@
   environment varibles. Multi-instance device paths should never be placed\r
   on a Handle.\r
 \r
   environment varibles. Multi-instance device paths should never be placed\r
   on a Handle.\r
 \r
-  Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials                          \r
   are licensed and made available under the terms and conditions of the BSD License         \r
   which accompanies this distribution.  The full text of the license may be found at        \r
   This program and the accompanying materials                          \r
   are licensed and made available under the terms and conditions of the BSD License         \r
   which accompanies this distribution.  The full text of the license may be found at        \r
@@ -153,12 +153,8 @@ DevicePathNodeLength (
   IN CONST VOID  *Node\r
   )\r
 {\r
   IN CONST VOID  *Node\r
   )\r
 {\r
-  UINTN Length;\r
-\r
   ASSERT (Node != NULL);\r
   ASSERT (Node != NULL);\r
-  Length = ReadUnaligned16 ((UINT16 *)&((EFI_DEVICE_PATH_PROTOCOL *)(Node))->Length[0]);\r
-  ASSERT (Length >= sizeof (EFI_DEVICE_PATH_PROTOCOL));\r
-  return Length;\r
+  return ReadUnaligned16 ((UINT16 *)&((EFI_DEVICE_PATH_PROTOCOL *)(Node))->Length[0]);\r
 }\r
 \r
 /**\r
 }\r
 \r
 /**\r