MdePkg: Clean up source files
1. Do not use tab characters 2. No trailing white space in one line 3. All files must end with CRLF Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Linked List Library Functions.
|
||||
|
||||
Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
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
|
||||
@@ -59,9 +59,9 @@
|
||||
|
||||
@retval TRUE if PcdVerifyNodeInList is FALSE
|
||||
@retval TRUE if DoMembershipCheck is FALSE
|
||||
@retval TRUE if PcdVerifyNodeInList is TRUE and DoMembershipCheck is TRUE
|
||||
@retval TRUE if PcdVerifyNodeInList is TRUE and DoMembershipCheck is TRUE
|
||||
and Node is a member of List.
|
||||
@retval FALSE if PcdVerifyNodeInList is TRUE and DoMembershipCheck is TRUE
|
||||
@retval FALSE if PcdVerifyNodeInList is TRUE and DoMembershipCheck is TRUE
|
||||
and Node is in not a member of List.
|
||||
|
||||
**/
|
||||
@@ -143,7 +143,7 @@ IsNodeInList (
|
||||
Ptr = FirstEntry;
|
||||
|
||||
//
|
||||
// Check to see if SecondEntry is a member of FirstEntry.
|
||||
// Check to see if SecondEntry is a member of FirstEntry.
|
||||
// Exit early if the number of nodes in List >= PcdMaximumLinkedListLength
|
||||
//
|
||||
do {
|
||||
@@ -230,7 +230,7 @@ InsertHeadList (
|
||||
// ASSERT List not too long and Entry is not one of the nodes of List
|
||||
//
|
||||
ASSERT_VERIFY_NODE_IN_VALID_LIST (ListHead, Entry, FALSE);
|
||||
|
||||
|
||||
Entry->ForwardLink = ListHead->ForwardLink;
|
||||
Entry->BackLink = ListHead;
|
||||
Entry->ForwardLink->BackLink = Entry;
|
||||
@@ -247,7 +247,7 @@ InsertHeadList (
|
||||
|
||||
If ListHead is NULL, then ASSERT().
|
||||
If Entry is NULL, then ASSERT().
|
||||
If ListHead was not initialized with INTIALIZE_LIST_HEAD_VARIABLE() or
|
||||
If ListHead was not initialized with INTIALIZE_LIST_HEAD_VARIABLE() or
|
||||
InitializeListHead(), then ASSERT().
|
||||
If PcdMaximumLinkedListLength is not zero, and prior to insertion the number
|
||||
of nodes in ListHead, including the ListHead node, is greater than or
|
||||
@@ -271,7 +271,7 @@ InsertTailList (
|
||||
// ASSERT List not too long and Entry is not one of the nodes of List
|
||||
//
|
||||
ASSERT_VERIFY_NODE_IN_VALID_LIST (ListHead, Entry, FALSE);
|
||||
|
||||
|
||||
Entry->ForwardLink = ListHead;
|
||||
Entry->BackLink = ListHead->BackLink;
|
||||
Entry->BackLink->ForwardLink = Entry;
|
||||
@@ -282,12 +282,12 @@ InsertTailList (
|
||||
/**
|
||||
Retrieves the first node of a doubly-linked list.
|
||||
|
||||
Returns the first node of a doubly-linked list. List must have been
|
||||
Returns the first node of a doubly-linked list. List must have been
|
||||
initialized with INTIALIZE_LIST_HEAD_VARIABLE() or InitializeListHead().
|
||||
If List is empty, then List is returned.
|
||||
|
||||
If List is NULL, then ASSERT().
|
||||
If List was not initialized with INTIALIZE_LIST_HEAD_VARIABLE() or
|
||||
If List was not initialized with INTIALIZE_LIST_HEAD_VARIABLE() or
|
||||
InitializeListHead(), then ASSERT().
|
||||
If PcdMaximumLinkedListLength is not zero, and the number of nodes
|
||||
in List, including the List node, is greater than or equal to
|
||||
@@ -316,13 +316,13 @@ GetFirstNode (
|
||||
/**
|
||||
Retrieves the next node of a doubly-linked list.
|
||||
|
||||
Returns the node of a doubly-linked list that follows Node.
|
||||
Returns the node of a doubly-linked list that follows Node.
|
||||
List must have been initialized with INTIALIZE_LIST_HEAD_VARIABLE()
|
||||
or InitializeListHead(). If List is empty, then List is returned.
|
||||
|
||||
If List is NULL, then ASSERT().
|
||||
If Node is NULL, then ASSERT().
|
||||
If List was not initialized with INTIALIZE_LIST_HEAD_VARIABLE() or
|
||||
If List was not initialized with INTIALIZE_LIST_HEAD_VARIABLE() or
|
||||
InitializeListHead(), then ASSERT().
|
||||
If PcdMaximumLinkedListLength is not zero, and List contains more than
|
||||
PcdMaximumLinkedListLength nodes, then ASSERT().
|
||||
@@ -351,24 +351,24 @@ GetNextNode (
|
||||
|
||||
/**
|
||||
Retrieves the previous node of a doubly-linked list.
|
||||
|
||||
Returns the node of a doubly-linked list that precedes Node.
|
||||
|
||||
Returns the node of a doubly-linked list that precedes Node.
|
||||
List must have been initialized with INTIALIZE_LIST_HEAD_VARIABLE()
|
||||
or InitializeListHead(). If List is empty, then List is returned.
|
||||
|
||||
|
||||
If List is NULL, then ASSERT().
|
||||
If Node is NULL, then ASSERT().
|
||||
If List was not initialized with INTIALIZE_LIST_HEAD_VARIABLE() or
|
||||
If List was not initialized with INTIALIZE_LIST_HEAD_VARIABLE() or
|
||||
InitializeListHead(), then ASSERT().
|
||||
If PcdMaximumLinkedListLength is not zero, and List contains more than
|
||||
PcdMaximumLinkedListLength nodes, then ASSERT().
|
||||
If PcdVerifyNodeInList is TRUE and Node is not a node in List, then ASSERT().
|
||||
|
||||
|
||||
@param List A pointer to the head node of a doubly-linked list.
|
||||
@param Node A pointer to a node in the doubly-linked list.
|
||||
|
||||
|
||||
@return A pointer to the previous node if one exists. Otherwise List is returned.
|
||||
|
||||
|
||||
**/
|
||||
LIST_ENTRY *
|
||||
EFIAPI
|
||||
@@ -381,7 +381,7 @@ GetPreviousNode (
|
||||
// ASSERT List not too long and Node is one of the nodes of List
|
||||
//
|
||||
ASSERT_VERIFY_NODE_IN_VALID_LIST (List, Node, TRUE);
|
||||
|
||||
|
||||
return Node->BackLink;
|
||||
}
|
||||
|
||||
@@ -392,7 +392,7 @@ GetPreviousNode (
|
||||
zero nodes, this function returns TRUE. Otherwise, it returns FALSE.
|
||||
|
||||
If ListHead is NULL, then ASSERT().
|
||||
If ListHead was not initialized with INTIALIZE_LIST_HEAD_VARIABLE() or
|
||||
If ListHead was not initialized with INTIALIZE_LIST_HEAD_VARIABLE() or
|
||||
InitializeListHead(), then ASSERT().
|
||||
If PcdMaximumLinkedListLength is not zero, and the number of nodes
|
||||
in List, including the List node, is greater than or equal to
|
||||
@@ -414,7 +414,7 @@ IsListEmpty (
|
||||
// ASSERT List not too long
|
||||
//
|
||||
ASSERT (InternalBaseLibIsListValid (ListHead));
|
||||
|
||||
|
||||
return (BOOLEAN)(ListHead->ForwardLink == ListHead);
|
||||
}
|
||||
|
||||
@@ -429,12 +429,12 @@ IsListEmpty (
|
||||
|
||||
If List is NULL, then ASSERT().
|
||||
If Node is NULL, then ASSERT().
|
||||
If List was not initialized with INTIALIZE_LIST_HEAD_VARIABLE() or InitializeListHead(),
|
||||
If List was not initialized with INTIALIZE_LIST_HEAD_VARIABLE() or InitializeListHead(),
|
||||
then ASSERT().
|
||||
If PcdMaximumLinkedListLength is not zero, and the number of nodes
|
||||
in List, including the List node, is greater than or equal to
|
||||
PcdMaximumLinkedListLength, then ASSERT().
|
||||
If PcdVerifyNodeInList is TRUE and Node is not a node in List and Node is not
|
||||
If PcdVerifyNodeInList is TRUE and Node is not a node in List and Node is not
|
||||
equal to List, then ASSERT().
|
||||
|
||||
@param List A pointer to the head node of a doubly-linked list.
|
||||
@@ -455,7 +455,7 @@ IsNull (
|
||||
// ASSERT List not too long and Node is one of the nodes of List
|
||||
//
|
||||
ASSERT_VERIFY_NODE_IN_VALID_LIST (List, Node, TRUE);
|
||||
|
||||
|
||||
return (BOOLEAN)(Node == List);
|
||||
}
|
||||
|
||||
@@ -493,7 +493,7 @@ IsNodeAtEnd (
|
||||
// ASSERT List not too long and Node is one of the nodes of List
|
||||
//
|
||||
ASSERT_VERIFY_NODE_IN_VALID_LIST (List, Node, TRUE);
|
||||
|
||||
|
||||
return (BOOLEAN)(!IsNull (List, Node) && List->BackLink == Node);
|
||||
}
|
||||
|
||||
@@ -505,12 +505,12 @@ IsNodeAtEnd (
|
||||
Otherwise, the location of the FirstEntry node is swapped with the location
|
||||
of the SecondEntry node in a doubly-linked list. SecondEntry must be in the
|
||||
same double linked list as FirstEntry and that double linked list must have
|
||||
been initialized with INTIALIZE_LIST_HEAD_VARIABLE() or InitializeListHead().
|
||||
been initialized with INTIALIZE_LIST_HEAD_VARIABLE() or InitializeListHead().
|
||||
SecondEntry is returned after the nodes are swapped.
|
||||
|
||||
If FirstEntry is NULL, then ASSERT().
|
||||
If SecondEntry is NULL, then ASSERT().
|
||||
If PcdVerifyNodeInList is TRUE and SecondEntry and FirstEntry are not in the
|
||||
If PcdVerifyNodeInList is TRUE and SecondEntry and FirstEntry are not in the
|
||||
same linked list, then ASSERT().
|
||||
If PcdMaximumLinkedListLength is not zero, and the number of nodes in the
|
||||
linked list containing the FirstEntry and SecondEntry nodes, including
|
||||
@@ -519,7 +519,7 @@ IsNodeAtEnd (
|
||||
|
||||
@param FirstEntry A pointer to a node in a linked list.
|
||||
@param SecondEntry A pointer to another node in the same linked list.
|
||||
|
||||
|
||||
@return SecondEntry.
|
||||
|
||||
**/
|
||||
@@ -540,7 +540,7 @@ SwapListEntries (
|
||||
// ASSERT Entry1 and Entry2 are in the same linked list
|
||||
//
|
||||
ASSERT_VERIFY_NODE_IN_VALID_LIST (FirstEntry, SecondEntry, TRUE);
|
||||
|
||||
|
||||
//
|
||||
// Ptr is the node pointed to by FirstEntry->ForwardLink
|
||||
//
|
||||
@@ -598,7 +598,7 @@ RemoveEntryList (
|
||||
)
|
||||
{
|
||||
ASSERT (!IsListEmpty (Entry));
|
||||
|
||||
|
||||
Entry->ForwardLink->BackLink = Entry->BackLink;
|
||||
Entry->BackLink->ForwardLink = Entry->ForwardLink;
|
||||
return Entry->ForwardLink;
|
||||
|
Reference in New Issue
Block a user