Remove the assertion which may cause IsDevicePathValid() hang in DEBUG build.

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
This commit is contained in:
Ruiyu Ni 2014-05-22 07:34:35 +00:00 committed by niruiyu
parent 21def103d5
commit ed2867debc
1 changed files with 2 additions and 6 deletions

View File

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