Author: tfaber
Date: Mon May 25 15:04:09 2015
New Revision: 67906
URL:
http://svn.reactos.org/svn/reactos?rev=67906&view=rev
Log:
[RTL][NTOSKRNL]
- Don't cast CONTAINING_RECORD
Modified:
trunk/reactos/lib/rtl/generictable.c
trunk/reactos/ntoskrnl/ex/sysinfo.c
trunk/reactos/ntoskrnl/fsrtl/tunnel.c
Modified: trunk/reactos/lib/rtl/generictable.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/generictable.c?rev…
==============================================================================
--- trunk/reactos/lib/rtl/generictable.c [iso-8859-1] (original)
+++ trunk/reactos/lib/rtl/generictable.c [iso-8859-1] Mon May 25 15:04:09 2015
@@ -438,9 +438,9 @@
if (NextI == OrderedElement)
{
/* Return it */
- return &((PTABLE_ENTRY_HEADER)CONTAINING_RECORD(OrderedNode,
- TABLE_ENTRY_HEADER,
- ListEntry))->UserData;
+ return &CONTAINING_RECORD(OrderedNode,
+ TABLE_ENTRY_HEADER,
+ ListEntry)->UserData;
}
/* Now check if we're farther behind */
@@ -505,9 +505,9 @@
Table->WhichOrderedElement = NextI;
/* Return the element */
- return &((PTABLE_ENTRY_HEADER)CONTAINING_RECORD(OrderedNode,
- TABLE_ENTRY_HEADER,
- ListEntry))->UserData;
+ return &CONTAINING_RECORD(OrderedNode,
+ TABLE_ENTRY_HEADER,
+ ListEntry)->UserData;
}
/* EOF */
Modified: trunk/reactos/ntoskrnl/ex/sysinfo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/sysinfo.c?rev=…
==============================================================================
--- trunk/reactos/ntoskrnl/ex/sysinfo.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ex/sysinfo.c [iso-8859-1] Mon May 25 15:04:09 2015
@@ -918,8 +918,7 @@
CurrentEntry = Process->Pcb.ThreadListHead.Flink;
while (CurrentEntry != &Process->Pcb.ThreadListHead)
{
- CurrentThread = (PETHREAD)CONTAINING_RECORD(CurrentEntry, KTHREAD,
- ThreadListEntry);
+ CurrentThread = CONTAINING_RECORD(CurrentEntry, ETHREAD,
Tcb.ThreadListEntry);
ThreadInfo->KernelTime.QuadPart =
UInt32x32To64(CurrentThread->Tcb.KernelTime, KeMaximumIncrement);
ThreadInfo->UserTime.QuadPart =
UInt32x32To64(CurrentThread->Tcb.UserTime, KeMaximumIncrement);
Modified: trunk/reactos/ntoskrnl/fsrtl/tunnel.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/fsrtl/tunnel.c?re…
==============================================================================
--- trunk/reactos/ntoskrnl/fsrtl/tunnel.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/fsrtl/tunnel.c [iso-8859-1] Mon May 25 15:04:09 2015
@@ -105,7 +105,7 @@
while(Entry != &Cache->TimerQueue)
{
/* get node entry */
- CurEntry = (PTUNNEL_NODE_ENTRY)CONTAINING_RECORD(Entry, TUNNEL_NODE_ENTRY,
TimerQueueEntry);
+ CurEntry = CONTAINING_RECORD(Entry, TUNNEL_NODE_ENTRY, TimerQueueEntry);
/* get next entry */
NextEntry = Entry->Flink;
@@ -124,7 +124,7 @@
/* If we have too many entries */
while (Cache->NumEntries > TunnelMaxEntries)
{
- CurEntry = (PTUNNEL_NODE_ENTRY)CONTAINING_RECORD(Entry, TUNNEL_NODE_ENTRY,
TimerQueueEntry);
+ CurEntry = CONTAINING_RECORD(Entry, TUNNEL_NODE_ENTRY, TimerQueueEntry);
FsRtlRemoveNodeFromTunnel(Cache, CurEntry, PoolList, &Rebalance);
}
}
@@ -295,7 +295,7 @@
{
/* and free them, one by one */
CurEntry = RemoveHeadList(PoolList);
- CurNode = (PTUNNEL_NODE_ENTRY)CONTAINING_RECORD(CurEntry, TUNNEL_NODE_ENTRY,
TimerQueueEntry);
+ CurNode = CONTAINING_RECORD(CurEntry, TUNNEL_NODE_ENTRY, TimerQueueEntry);
FsRtlFreeTunnelNode(CurNode, 0);
}
}
@@ -609,7 +609,7 @@
CurEntry = Cache->Cache;
while (CurEntry)
{
- CurNode = (PTUNNEL_NODE_ENTRY)CONTAINING_RECORD(CurEntry, TUNNEL_NODE_ENTRY,
SplayInfo);
+ CurNode = CONTAINING_RECORD(CurEntry, TUNNEL_NODE_ENTRY, SplayInfo);
if (CurNode->DirectoryKey > DirectoryKey)
{
@@ -647,7 +647,7 @@
/* delete any matching key */
do
{
- CurNode = (PTUNNEL_NODE_ENTRY)CONTAINING_RECORD(LastEntry, TUNNEL_NODE_ENTRY,
SplayInfo);
+ CurNode = CONTAINING_RECORD(LastEntry, TUNNEL_NODE_ENTRY, SplayInfo);
Successors = RtlRealSuccessor(LastEntry);
if (CurNode->DirectoryKey != DirectoryKey)
@@ -704,7 +704,7 @@
while(Entry != &Cache->TimerQueue)
{
/* get node entry */
- CurEntry = (PTUNNEL_NODE_ENTRY)CONTAINING_RECORD(Entry, TUNNEL_NODE_ENTRY,
TimerQueueEntry);
+ CurEntry = CONTAINING_RECORD(Entry, TUNNEL_NODE_ENTRY, TimerQueueEntry);
/* get next entry */
NextEntry = Entry->Flink;