Author: fireball
Date: Wed Jan 4 12:22:38 2012
New Revision: 54833
URL:
http://svn.reactos.org/svn/reactos?rev=54833&view=rev
Log:
[NTOS]
- Cast to actually returned types not just PVOID.
Modified:
trunk/reactos/ntoskrnl/include/internal/lpc_x.h
Modified: trunk/reactos/ntoskrnl/include/internal/lpc_x.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/lpc_x.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/include/internal/lpc_x.h [iso-8859-1] Wed Jan 4 12:22:38 2012
@@ -103,7 +103,7 @@
/* Allocate a message from the port zone while holding the lock */
KeAcquireGuardedMutex(&LpcpLock);
- Message = ExAllocateFromPagedLookasideList(&LpcpMessagesLookaside);
+ Message =
(PLPCP_MESSAGE)ExAllocateFromPagedLookasideList(&LpcpMessagesLookaside);
if (!Message)
{
/* Fail, and let caller cleanup */
@@ -136,7 +136,7 @@
}
/* Otherwise, this is a message. Return the pointer */
- return (PVOID)((ULONG_PTR)Thread->LpcReplyMessage & ~LPCP_THREAD_FLAGS);
+ return (PLPCP_MESSAGE)((ULONG_PTR)Thread->LpcReplyMessage &
~LPCP_THREAD_FLAGS);
}
FORCEINLINE
@@ -147,7 +147,7 @@
if (((ULONG_PTR)Thread->LpcReplyMessage) & LPCP_THREAD_FLAG_IS_PORT)
{
/* The pointer is actually a port, return it */
- return (PVOID)((ULONG_PTR)Thread->LpcWaitingOnPort &
+ return (PLPCP_PORT_OBJECT)((ULONG_PTR)Thread->LpcWaitingOnPort &
~LPCP_THREAD_FLAGS);
}