diff options
author | Marvin.Haeuser@outlook.com <Marvin.Haeuser@outlook.com> | 2017-08-04 03:52:15 +0800 |
---|---|---|
committer | Liming Gao <liming.gao@intel.com> | 2017-08-16 16:55:32 +0800 |
commit | 9062381a8c60a5d26cf061d25e08864e5fb630df (patch) | |
tree | 351466ff3e5b96e16ec0661011b004c6131d675c /Contributions.txt | |
parent | d0aef615acb0b1cb3c1662a7d2562ea7bef471ec (diff) | |
download | edk2-9062381a8c60a5d26cf061d25e08864e5fb630df.tar.gz edk2-9062381a8c60a5d26cf061d25e08864e5fb630df.tar.bz2 edk2-9062381a8c60a5d26cf061d25e08864e5fb630df.zip |
MdePkg/BaseLib: Update internal LinkedList verifications.
1) Replace InternalBaseLibIsNodeInList() with
InternalBaseLibIsListValid().
- The verification whether Node is within the doubly-linked List
is now done by IsNodeInList().
- Whether the list is valid is returned.
2) The comments within InsertHeadList() and InsertTailList() stated
that it is checked whether Entry is not part of the doubly-linked
list. This was not done as argument 3 of
InternalBaseLibIsNodeInList() indicated whether the check is done,
not whether to check if the node is or is not in the list. This
has been fixed by using IsNodeInList() for the ASSERTs.
V2:
- Fix IsListEmpty() to ASSERT when the passed list is invalid.
- Introduce the VERIFY_IS_NODE_IN_LIST() macro to only verify whether the
passed node is part of the list when PcdVerifyNodeInList is TRUE.
V3:
- Introduce the ASSERT_VERIFY_NODE_IN_VALID_LIST() macro which,
depending on the value of PcdVerifyNodeInList, verifies whether
SecondEntry is or is not part of the same doubly-linked list as
FirstEntry and unconditionally verifies whether the doubly-linked
list FirstEntry is part of is valid. This prevents
InternalBaseLibIsListValid() from being called twice when a
function ASSERTs via the result of IsNodeInList(), as it calls
InternalBaseLibIsListValid() already.
- Remove the VERIFY_IS_NODE_IN_LIST() macro in favor of
ASSERT_VERIFY_NODE_IN_VALID_LIST().
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Marvin Haeuser <Marvin.Haeuser@outlook.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'Contributions.txt')
0 files changed, 0 insertions, 0 deletions