From daae3048fd971e0844a9e241e4245b342f2cdd8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Sun, 26 Jun 2005 12:51:17 +0000 Subject: [PATCH] Move variable declaration at the top of the function Remove unneeded affectation of hProcessHeap (already initialized in DllMain) svn path=/trunk/; revision=16285 --- reactos/lib/kernel32/misc/comm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/reactos/lib/kernel32/misc/comm.c b/reactos/lib/kernel32/misc/comm.c index f3cd0833e31..3bb5f720fd1 100644 --- a/reactos/lib/kernel32/misc/comm.c +++ b/reactos/lib/kernel32/misc/comm.c @@ -936,14 +936,14 @@ STDCALL GetCommConfig(HANDLE hCommDev, LPCOMMCONFIG lpCC, LPDWORD lpdwSize) { BOOL ReturnValue = FALSE; + LPCOMMPROP lpComPort; DPRINT("GetCommConfig(%d, %p, %p)\n", hCommDev, lpCC, lpdwSize); - hProcessHeap = GetProcessHeap(); + lpComPort = RtlAllocateHeap( hProcessHeap, + HEAP_ZERO_MEMORY, + sizeof(COMMPROP) + 0x100 ); - LPCOMMPROP lpComPort = RtlAllocateHeap( hProcessHeap, - HEAP_ZERO_MEMORY, - sizeof(COMMPROP) + 0x100 ); if(NULL == lpComPort) { DPRINT("GetCommConfig() - ERROR_NOT_ENOUGH_MEMORY\n"); SetLastError(ERROR_NOT_ENOUGH_MEMORY);