mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
merged better assert code back into main trunk
svn path=/trunk/; revision=893
This commit is contained in:
parent
cc5dc64c30
commit
dfa5f04c63
1 changed files with 5 additions and 6 deletions
|
@ -19,9 +19,9 @@ static BOOLEAN CheckEntry(PLIST_ENTRY ListEntry)
|
||||||
{
|
{
|
||||||
assert(ListEntry!=NULL);
|
assert(ListEntry!=NULL);
|
||||||
assert(ListEntry->Blink!=NULL);
|
assert(ListEntry->Blink!=NULL);
|
||||||
assert(ListEntry->Blink->Flink!=NULL);
|
assert(ListEntry->Blink->Flink==ListEntry);
|
||||||
assert(ListEntry->Flink!=NULL);
|
assert(ListEntry->Flink!=NULL);
|
||||||
assert(ListEntry->Flink->Blink!=NULL);
|
assert(ListEntry->Flink->Blink==ListEntry);
|
||||||
return(TRUE);
|
return(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,7 +51,6 @@ VOID RemoveEntryList(PLIST_ENTRY ListEntry)
|
||||||
OldFlink->Blink=OldBlink;
|
OldFlink->Blink=OldBlink;
|
||||||
OldBlink->Flink=OldFlink;
|
OldBlink->Flink=OldFlink;
|
||||||
|
|
||||||
assert(CheckEntry(ListEntry));
|
|
||||||
|
|
||||||
DPRINT("RemoveEntryList()\n");
|
DPRINT("RemoveEntryList()\n");
|
||||||
}
|
}
|
||||||
|
@ -80,8 +79,6 @@ PLIST_ENTRY RemoveHeadList(PLIST_ENTRY ListHead)
|
||||||
Old = ListHead->Flink;
|
Old = ListHead->Flink;
|
||||||
RemoveEntryList(ListHead->Flink);
|
RemoveEntryList(ListHead->Flink);
|
||||||
|
|
||||||
assert(CheckEntry(ListHead));
|
|
||||||
|
|
||||||
DPRINT("RemoveHeadList()\n");
|
DPRINT("RemoveHeadList()\n");
|
||||||
|
|
||||||
return(Old);
|
return(Old);
|
||||||
|
@ -106,12 +103,13 @@ VOID InsertTailList(PLIST_ENTRY ListHead, PLIST_ENTRY ListEntry)
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
PLIST_ENTRY Blink;
|
PLIST_ENTRY Blink;
|
||||||
|
|
||||||
Blink = ListHead->Blink;
|
Blink = ListHead->Blink;
|
||||||
ListEntry->Flink=ListHead;
|
ListEntry->Flink=ListHead;
|
||||||
ListEntry->Blink=Blink;
|
ListEntry->Blink=Blink;
|
||||||
Blink->Flink=ListEntry;
|
Blink->Flink=ListEntry;
|
||||||
ListHead->Blink=ListEntry;
|
ListHead->Blink=ListEntry;
|
||||||
|
assert( CheckEntry( ListEntry ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID InsertHeadList(PLIST_ENTRY ListHead, PLIST_ENTRY ListEntry)
|
VOID InsertHeadList(PLIST_ENTRY ListHead, PLIST_ENTRY ListEntry)
|
||||||
|
@ -123,6 +121,7 @@ VOID InsertHeadList(PLIST_ENTRY ListHead, PLIST_ENTRY ListEntry)
|
||||||
ListEntry->Blink = ListHead;
|
ListEntry->Blink = ListHead;
|
||||||
OldFlink->Blink = ListEntry;
|
OldFlink->Blink = ListEntry;
|
||||||
ListHead->Flink = ListEntry;
|
ListHead->Flink = ListEntry;
|
||||||
|
assert( CheckEntry( ListEntry ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
PLIST_ENTRY ExInterlockedInsertTailList(PLIST_ENTRY ListHead,
|
PLIST_ENTRY ExInterlockedInsertTailList(PLIST_ENTRY ListHead,
|
||||||
|
|
Loading…
Reference in a new issue