diff --git a/dlls/ntdll/debugbuffer.c b/dlls/ntdll/debugbuffer.c index be1ddffc1da..0ad8882c267 100644 --- a/dlls/ntdll/debugbuffer.c +++ b/dlls/ntdll/debugbuffer.c @@ -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; diff --git a/dlls/ntdll/reg.c b/dlls/ntdll/reg.c index af0f20015b0..8aba3aea9cc 100644 --- a/dlls/ntdll/reg.c +++ b/dlls/ntdll/reg.c @@ -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); } diff --git a/dlls/ntdll/rtlstr.c b/dlls/ntdll/rtlstr.c index 3a50155d8f2..de208a236f0 100644 --- a/dlls/ntdll/rtlstr.c +++ b/dlls/ntdll/rtlstr.c @@ -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; diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c index fb2c0fdd160..a9482e97b68 100644 --- a/dlls/ntdll/signal_i386.c +++ b/dlls/ntdll/signal_i386.c @@ -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 );