[PATCH 1/4] dlls/ntdll: Add handle count to NtQuerySystemInformation
Vitaliy Margolen
wine-devel at kievinfo.com
Mon Jun 20 00:08:30 CDT 2011
On 06/19/2011 08:15 PM, Austin Lund wrote:
> + ret = wine_server_call( req );
> + shi->Count += reply->handles;
> + len = sizeof(SYSTEM_HANDLE_ENTRY)*shi->Count + sizeof(ULONG);
> + shi = RtlReAllocateHeap(GetProcessHeap(), HEAP_ZERO_MEMORY, shi, len);
Please do allocations outside of server call block. And add handling of
failed realloc. Also please double the allocated size, don't reallocate
after each server call.
> + for (i = shi->Count - reply->handles; i< shi->Count; i++) {
> + shi->Handle[i].OwnerPid = reply->pid;
> + }
Please follow file's curly braces style - none for single line blocks, or on
separate line for multi-line blocks.
Vitaliy.
More information about the wine-devel
mailing list