mirror of
https://github.com/reactos/reactos.git
synced 2024-10-02 07:26:47 +00:00
Ok Arch, it's good to remove unuseful brackets, but don't exaggerate too much. Also check how the RtlInsertAsLeft/RightChild macros are defined. Since MS don't use the nice do { ... } while(0) for them, you cannot just use the if (blah) foo(); else bar(); to do the job, but you need the extra-brackets. And you cannot just change the macros definitions to not "break" headers compatibility (or... idiocies).
svn path=/trunk/; revision=64820
This commit is contained in:
parent
b858c18208
commit
a4a867f83a
|
@ -22,17 +22,25 @@ VOID
|
|||
FixupChildLinks(PRTL_SPLAY_LINKS Links, BOOLEAN Root, BOOLEAN LeftChild)
|
||||
{
|
||||
if (RtlLeftChild(Links))
|
||||
{
|
||||
RtlInsertAsLeftChild(Links, RtlLeftChild(Links));
|
||||
}
|
||||
|
||||
if (RtlRightChild(Links))
|
||||
{
|
||||
RtlInsertAsRightChild(Links, RtlRightChild(Links));
|
||||
}
|
||||
|
||||
if (!Root)
|
||||
{
|
||||
if (LeftChild)
|
||||
{
|
||||
RtlInsertAsLeftChild(RtlParent(Links), Links);
|
||||
}
|
||||
else
|
||||
{
|
||||
RtlInsertAsRightChild(RtlParent(Links), Links);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -86,15 +94,23 @@ SwapSplayLinks(PRTL_SPLAY_LINKS LinkA,
|
|||
if (!RootA)
|
||||
{
|
||||
if (LeftA)
|
||||
{
|
||||
RtlInsertAsLeftChild(RtlParent(&Ta), LinkB);
|
||||
}
|
||||
else
|
||||
{
|
||||
RtlInsertAsRightChild(RtlParent(&Ta), LinkB);
|
||||
}
|
||||
}
|
||||
|
||||
if (LeftB)
|
||||
{
|
||||
RtlInsertAsLeftChild(LinkB, LinkA);
|
||||
}
|
||||
else
|
||||
{
|
||||
RtlInsertAsRightChild(LinkB, LinkA);
|
||||
}
|
||||
}
|
||||
|
||||
FixupChildLinks(LinkA, FALSE, LeftB);
|
||||
|
|
Loading…
Reference in a new issue