summaryrefslogtreecommitdiff
path: root/MdePkg/Library/BaseLib/LinkedList.c
diff options
context:
space:
mode:
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2006-06-02 07:58:31 +0000
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2006-06-02 07:58:31 +0000
commit7d7c2b4640a6b46eed90af5777f8d22504519a8e (patch)
tree9c0a04ff526f8204c6977720cea02847871fec41 /MdePkg/Library/BaseLib/LinkedList.c
parent6fc80a45b523d64f078f3d42f0994a36c02b8786 (diff)
downloadedk2-platforms-7d7c2b4640a6b46eed90af5777f8d22504519a8e.tar.xz
Deleted x64\SwitchStack.c Ipf/SwitchStack.c.
Added SwitchStack.c in Baselib\ Rename Ia32/SwitchStack.c to Ia32/InternalSwitchStack.c Changed _SwitchStack() into InternalSwitchStack() in SwitchStack.asm and SwitchStack.s Fixed one bug in LinkedList.c, that List length couldn't up to PcdMaximumLinkedListLength. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@394 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library/BaseLib/LinkedList.c')
-rw-r--r--MdePkg/Library/BaseLib/LinkedList.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/MdePkg/Library/BaseLib/LinkedList.c b/MdePkg/Library/BaseLib/LinkedList.c
index 0f42749775..9ad1b0875b 100644
--- a/MdePkg/Library/BaseLib/LinkedList.c
+++ b/MdePkg/Library/BaseLib/LinkedList.c
@@ -34,6 +34,10 @@ IsNodeInList (
ASSERT (Node != NULL);
Count = FixedPcdGet32 (PcdMaximumLinkedListLength);
+ if (Count != 0) {
+ Count++;
+ }
+
Ptr = List;
do {
Ptr = Ptr->ForwardLink;
@@ -44,6 +48,7 @@ IsNodeInList (
if (FixedPcdGet32 (PcdMaximumLinkedListLength) > 0) {
while ((Count > 0) && (Ptr != List)) {
Ptr = Ptr->ForwardLink;
+ Count--;
}
ASSERT (Count > 0);
}