- Removed some unnecessary type casts.

svn path=/trunk/; revision=11645
This commit is contained in:
Hartmut Birr 2004-11-13 22:27:16 +00:00
parent 9f05cd01e3
commit 5260bf08c8
6 changed files with 21 additions and 21 deletions

View file

@ -194,7 +194,7 @@ NTSTATUS LdrpMapSystemDll(HANDLE ProcessHandle,
if (Process != CurrentProcess)
{
DPRINT("Attaching to Process\n");
KeAttachProcess((PKPROCESS)Process);
KeAttachProcess(&Process->Pcb);
}
/*

View file

@ -1,4 +1,4 @@
/* $Id: send.c,v 1.19 2004/11/11 22:37:05 ion Exp $
/* $Id: send.c,v 1.20 2004/11/13 22:27:16 hbirr Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -218,7 +218,7 @@ NtRequestWaitReplyPort (IN HANDLE PortHandle,
PLPC_MESSAGE UnsafeLpcReply)
{
PETHREAD CurrentThread;
struct _EPROCESS *AttachedProcess;
struct _KPROCESS *AttachedProcess;
NTSTATUS Status;
PEPORT Port;
PQUEUEDMESSAGE Message;
@ -257,7 +257,7 @@ NtRequestWaitReplyPort (IN HANDLE PortHandle,
}
else
{
AttachedProcess = (PEPROCESS)CurrentThread->Tcb.ApcState.Process;
AttachedProcess = CurrentThread->Tcb.ApcState.Process;
KeDetachProcess();
}
@ -268,7 +268,7 @@ NtRequestWaitReplyPort (IN HANDLE PortHandle,
{
if (NULL != AttachedProcess)
{
KeAttachProcess((PKPROCESS)AttachedProcess);
KeAttachProcess(AttachedProcess);
}
ObDereferenceObject(Port);
return(Status);
@ -277,7 +277,7 @@ NtRequestWaitReplyPort (IN HANDLE PortHandle,
{
if (NULL != AttachedProcess)
{
KeAttachProcess((PKPROCESS)AttachedProcess);
KeAttachProcess(AttachedProcess);
}
ObDereferenceObject(Port);
return(STATUS_PORT_MESSAGE_TOO_LONG);
@ -287,7 +287,7 @@ NtRequestWaitReplyPort (IN HANDLE PortHandle,
{
if (NULL != AttachedProcess)
{
KeAttachProcess((PKPROCESS)AttachedProcess);
KeAttachProcess(AttachedProcess);
}
ObDereferenceObject(Port);
return(STATUS_NO_MEMORY);
@ -299,7 +299,7 @@ NtRequestWaitReplyPort (IN HANDLE PortHandle,
ExFreePool(LpcRequest);
if (NULL != AttachedProcess)
{
KeAttachProcess((PKPROCESS)AttachedProcess);
KeAttachProcess(AttachedProcess);
}
ObDereferenceObject(Port);
return(Status);
@ -310,7 +310,7 @@ NtRequestWaitReplyPort (IN HANDLE PortHandle,
ExFreePool(LpcRequest);
if (NULL != AttachedProcess)
{
KeAttachProcess((PKPROCESS)AttachedProcess);
KeAttachProcess(AttachedProcess);
}
ObDereferenceObject(Port);
return(STATUS_PORT_MESSAGE_TOO_LONG);
@ -320,7 +320,7 @@ NtRequestWaitReplyPort (IN HANDLE PortHandle,
ExFreePool(LpcRequest);
if (NULL != AttachedProcess)
{
KeAttachProcess((PKPROCESS)AttachedProcess);
KeAttachProcess(AttachedProcess);
}
ObDereferenceObject(Port);
return(STATUS_PORT_MESSAGE_TOO_LONG);
@ -336,7 +336,7 @@ NtRequestWaitReplyPort (IN HANDLE PortHandle,
ExFreePool(LpcRequest);
if (NULL != AttachedProcess)
{
KeAttachProcess((PKPROCESS)AttachedProcess);
KeAttachProcess(AttachedProcess);
}
ObDereferenceObject(Port);
return(Status);
@ -382,7 +382,7 @@ NtRequestWaitReplyPort (IN HANDLE PortHandle,
}
if (NULL != AttachedProcess)
{
KeAttachProcess((PKPROCESS)AttachedProcess);
KeAttachProcess(AttachedProcess);
}
ObDereferenceObject(Port);

View file

@ -453,7 +453,7 @@ MmFreeMemoryArea(PMADDRESS_SPACE AddressSpace,
if (AddressSpace->Process != NULL &&
AddressSpace->Process != CurrentProcess)
{
KeAttachProcess((PKPROCESS)AddressSpace->Process);
KeAttachProcess(&AddressSpace->Process->Pcb);
}
EndAddress = (char*)MemoryArea->BaseAddress + PAGE_ROUND_UP(MemoryArea->Length);
for (Address = MemoryArea->BaseAddress; Address < EndAddress; Address += PAGE_SIZE)

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id: virtual.c,v 1.84 2004/11/11 22:23:52 ion Exp $
/* $Id: virtual.c,v 1.85 2004/11/13 22:27:16 hbirr Exp $
*
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/mm/virtual.c
@ -425,7 +425,7 @@ NtReadVirtualMemory(IN HANDLE ProcessHandle,
UserMode,
IoWriteAccess);
KeAttachProcess((PKPROCESS)Process);
KeAttachProcess(&Process->Pcb);
SystemAddress = MmGetSystemAddressForMdl(Mdl);
memcpy(SystemAddress, BaseAddress, NumberOfBytesToRead);
@ -553,7 +553,7 @@ NtWriteVirtualMemory(IN HANDLE ProcessHandle,
ObDereferenceObject(Process);
return(STATUS_NO_MEMORY);
}
KeAttachProcess((PKPROCESS)Process);
KeAttachProcess(&Process->Pcb);
SystemAddress = MmGetSystemAddressForMdl(Mdl);
memcpy(BaseAddress, SystemAddress, NumberOfBytesToWrite);

View file

@ -1,4 +1,4 @@
/* $Id: kill.c,v 1.82 2004/11/11 22:40:30 ion Exp $
/* $Id: kill.c,v 1.83 2004/11/13 22:27:15 hbirr Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -288,7 +288,7 @@ PiTerminateProcess(PEPROCESS Process,
CurrentProcess = PsGetCurrentProcess();
if (Process != CurrentProcess)
{
KeAttachProcess((PKPROCESS) Process );
KeAttachProcess(&Process->Pcb);
}
ObCloseAllHandles(Process);
if (Process != CurrentProcess)

View file

@ -1,4 +1,4 @@
/* $Id: process.c,v 1.150 2004/11/11 22:40:30 ion Exp $
/* $Id: process.c,v 1.151 2004/11/13 22:27:15 hbirr Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -364,7 +364,7 @@ PiDeleteProcessWorker(PVOID pContext)
if (CurrentProcess != Process)
{
KeAttachProcess((PKPROCESS)Process);
KeAttachProcess(&Process->Pcb);
}
KeAcquireSpinLock(&PsProcessListLock, &oldIrql);
@ -486,7 +486,7 @@ PsCreatePeb(HANDLE ProcessHandle,
}
DPRINT("TableBase %p ViewSize %lx\n", TableBase, ViewSize);
KeAttachProcess((PKPROCESS)Process);
KeAttachProcess(&Process->Pcb);
/* Initialize the PEB */
RtlZeroMemory(Peb, sizeof(PEB));