Move variable declaration at the top of the function
Remove unneeded affectation of hProcessHeap (already initialized in DllMain)
Modified: trunk/reactos/lib/kernel32/misc/comm.c

Modified: trunk/reactos/lib/kernel32/misc/comm.c
--- trunk/reactos/lib/kernel32/misc/comm.c	2005-06-26 12:17:27 UTC (rev 16284)
+++ trunk/reactos/lib/kernel32/misc/comm.c	2005-06-26 12:51:17 UTC (rev 16285)
@@ -936,14 +936,14 @@
 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);