mirror of
https://github.com/reactos/reactos.git
synced 2025-05-20 17:45:06 +00:00
Move variable declaration at the top of the function
Remove unneeded affectation of hProcessHeap (already initialized in DllMain) svn path=/trunk/; revision=16285
This commit is contained in:
parent
489bda971f
commit
daae3048fd
1 changed files with 4 additions and 4 deletions
|
@ -936,14 +936,14 @@ STDCALL
|
||||||
GetCommConfig(HANDLE hCommDev, LPCOMMCONFIG lpCC, LPDWORD lpdwSize)
|
GetCommConfig(HANDLE hCommDev, LPCOMMCONFIG lpCC, LPDWORD lpdwSize)
|
||||||
{
|
{
|
||||||
BOOL ReturnValue = FALSE;
|
BOOL ReturnValue = FALSE;
|
||||||
|
LPCOMMPROP lpComPort;
|
||||||
|
|
||||||
DPRINT("GetCommConfig(%d, %p, %p)\n", hCommDev, lpCC, lpdwSize);
|
DPRINT("GetCommConfig(%d, %p, %p)\n", hCommDev, lpCC, lpdwSize);
|
||||||
|
|
||||||
hProcessHeap = GetProcessHeap();
|
lpComPort = RtlAllocateHeap( hProcessHeap,
|
||||||
|
|
||||||
LPCOMMPROP lpComPort = RtlAllocateHeap( hProcessHeap,
|
|
||||||
HEAP_ZERO_MEMORY,
|
HEAP_ZERO_MEMORY,
|
||||||
sizeof(COMMPROP) + 0x100 );
|
sizeof(COMMPROP) + 0x100 );
|
||||||
|
|
||||||
if(NULL == lpComPort) {
|
if(NULL == lpComPort) {
|
||||||
DPRINT("GetCommConfig() - ERROR_NOT_ENOUGH_MEMORY\n");
|
DPRINT("GetCommConfig() - ERROR_NOT_ENOUGH_MEMORY\n");
|
||||||
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||||
|
|
Loading…
Reference in a new issue