Commit 26bba27d authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

ntdll: Don't cast void pointers to other pointer types.

parent a63749cc
......@@ -96,7 +96,7 @@ PDEBUG_BUFFER WINAPI RtlCreateQueryDebugBuffer(IN ULONG iSize, IN BOOLEAN iEvent
if (iSize < sizeof(DEBUG_BUFFER)) {
iSize = sizeof(DEBUG_BUFFER);
}
oBuf = (PDEBUG_BUFFER) RtlAllocateHeap(GetProcessHeap(), 0, iSize);
oBuf = RtlAllocateHeap(GetProcessHeap(), 0, iSize);
memset(oBuf, 0, iSize);
FIXME("(%d, %d): returning %p\n", iSize, iEventPair, oBuf);
return oBuf;
......
......@@ -325,7 +325,7 @@ NTSTATUS WINAPI RtlpNtEnumerateSubKey( HANDLE handle, UNICODE_STRING *out, ULONG
if (out->Length)
{
dwLen = out->Length + sizeof(KEY_BASIC_INFORMATION);
info = (KEY_BASIC_INFORMATION*)RtlAllocateHeap( GetProcessHeap(), 0, dwLen );
info = RtlAllocateHeap( GetProcessHeap(), 0, dwLen );
if (!info)
return STATUS_NO_MEMORY;
}
......@@ -543,7 +543,7 @@ NTSTATUS WINAPI RtlpNtQueryValueKey( HANDLE handle, ULONG *result_type, PBYTE de
DWORD dwResultLen;
DWORD dwLen = sizeof (KEY_VALUE_PARTIAL_INFORMATION) + (result_len ? *result_len : 0);
info = (KEY_VALUE_PARTIAL_INFORMATION*)RtlAllocateHeap( GetProcessHeap(), 0, dwLen );
info = RtlAllocateHeap( GetProcessHeap(), 0, dwLen );
if (!info)
return STATUS_NO_MEMORY;
......@@ -1220,8 +1220,7 @@ NTSTATUS WINAPI RtlQueryRegistryValues(IN ULONG RelativeTo, IN PCWSTR Path,
{
buflen = len;
RtlFreeHeap(GetProcessHeap(), 0, pInfo);
pInfo = (KEY_VALUE_FULL_INFORMATION*)RtlAllocateHeap(
GetProcessHeap(), 0, buflen);
pInfo = RtlAllocateHeap(GetProcessHeap(), 0, buflen);
NtEnumerateValueKey(handle, i, KeyValueFullInformation,
pInfo, buflen, &len);
}
......@@ -1255,8 +1254,7 @@ NTSTATUS WINAPI RtlQueryRegistryValues(IN ULONG RelativeTo, IN PCWSTR Path,
{
buflen = len;
RtlFreeHeap(GetProcessHeap(), 0, pInfo);
pInfo = (KEY_VALUE_FULL_INFORMATION*)RtlAllocateHeap(
GetProcessHeap(), 0, buflen);
pInfo = RtlAllocateHeap(GetProcessHeap(), 0, buflen);
status = NtQueryValueKey(handle, &Value,
KeyValueFullInformation, pInfo, buflen, &len);
}
......
......@@ -2126,7 +2126,7 @@ NTSTATUS WINAPI RtlStringFromGUID(const GUID* guid, UNICODE_STRING *str)
str->Length = GUID_STRING_LENGTH * sizeof(WCHAR);
str->MaximumLength = str->Length + sizeof(WCHAR);
str->Buffer = (WCHAR*)RtlAllocateHeap(GetProcessHeap(), 0, str->MaximumLength);
str->Buffer = RtlAllocateHeap(GetProcessHeap(), 0, str->MaximumLength);
if (!str->Buffer)
{
str->Length = str->MaximumLength = 0;
......
......@@ -599,7 +599,7 @@ static void wine_sigacthandler( int signal, siginfo_t *siginfo, void *sigcontext
__asm__ __volatile__("mov %ss,%ax; mov %ax,%ds; mov %ax,%es");
thread_data = (struct ntdll_thread_data *)get_current_teb()->SystemReserved2;
thread_data = get_current_teb()->SystemReserved2;
wine_set_fs( thread_data->fs );
wine_set_gs( thread_data->gs );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment