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

This commit is contained in:
Michael Stefaniuc 2008-10-23 23:53:02 +02:00 committed by Alexandre Julliard
parent a63749cce0
commit 26bba27dc0
4 changed files with 7 additions and 9 deletions

View File

@ -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;

View File

@ -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);
}

View File

@ -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;

View File

@ -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 );