Move variable declaration at the top of the function
authorHervé Poussineau <hpoussin@reactos.org>
Sun, 26 Jun 2005 12:51:17 +0000 (12:51 +0000)
committerHervé Poussineau <hpoussin@reactos.org>
Sun, 26 Jun 2005 12:51:17 +0000 (12:51 +0000)
Remove unneeded affectation of hProcessHeap (already initialized in DllMain)

svn path=/trunk/; revision=16285

reactos/lib/kernel32/misc/comm.c

index f3cd083..3bb5f72 100644 (file)
@@ -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);