[ros-diffs] [hpoussin] 16285: Move variable declaration at the top of the function

hpoussin at svn.reactos.com hpoussin at svn.reactos.com
Sun Jun 26 14:51:24 CEST 2005


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);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20050626/db85aa69/attachment.html


More information about the Ros-diffs mailing list