ntdll: Remove unneeded casts.

This commit is contained in:
Andrew Talbot 2007-12-28 17:21:48 +00:00 committed by Alexandre Julliard
parent 8402f7a437
commit 1ebe82af65
6 changed files with 8 additions and 8 deletions

View File

@ -209,7 +209,7 @@ static inline HANDLE get_semaphore( RTL_CRITICAL_SECTION *crit )
HANDLE sem; HANDLE sem;
if (NtCreateSemaphore( &sem, SEMAPHORE_ALL_ACCESS, NULL, 0, 1 )) return 0; if (NtCreateSemaphore( &sem, SEMAPHORE_ALL_ACCESS, NULL, 0, 1 )) return 0;
if (!(ret = (HANDLE)interlocked_cmpxchg_ptr( (PVOID *)&crit->LockSemaphore, if (!(ret = (HANDLE)interlocked_cmpxchg_ptr( (PVOID *)&crit->LockSemaphore,
(PVOID)sem, 0 ))) sem, 0 )))
ret = sem; ret = sem;
else else
NtClose(sem); /* somebody beat us to it */ NtClose(sem); /* somebody beat us to it */

View File

@ -1621,8 +1621,8 @@ NTSTATUS WINAPI RtlWalkHeap( HANDLE heap, PVOID entry_ptr )
ptr = entry->lpData; ptr = entry->lpData;
LIST_FOR_EACH_ENTRY( sub, &heapPtr->subheap_list, SUBHEAP, entry ) LIST_FOR_EACH_ENTRY( sub, &heapPtr->subheap_list, SUBHEAP, entry )
{ {
if (((char *)ptr >= (char *)sub->base) && if ((ptr >= (char *)sub->base) &&
((char *)ptr < (char *)sub->base + sub->size)) (ptr < (char *)sub->base + sub->size))
{ {
currentheap = sub; currentheap = sub;
break; break;

View File

@ -833,7 +833,7 @@ NTSTATUS WINAPI RtlFormatCurrentUserKeyPath( IN OUT PUNICODE_STRING KeyPath)
KeyPath->Buffer = (PWCHAR)((LPBYTE)buf + sizeof(pathW)); KeyPath->Buffer = (PWCHAR)((LPBYTE)buf + sizeof(pathW));
status = RtlConvertSidToUnicodeString(KeyPath, status = RtlConvertSidToUnicodeString(KeyPath,
((TOKEN_USER *)buffer)->User.Sid, FALSE); ((TOKEN_USER *)buffer)->User.Sid, FALSE);
KeyPath->Buffer = (PWCHAR)buf; KeyPath->Buffer = buf;
KeyPath->Length += sizeof(pathW); KeyPath->Length += sizeof(pathW);
KeyPath->MaximumLength += sizeof(pathW); KeyPath->MaximumLength += sizeof(pathW);
} }

View File

@ -526,7 +526,7 @@ void RELAY_SetupDLL( HMODULE module )
/* patch the functions in the export table to point to the relay thunks */ /* patch the functions in the export table to point to the relay thunks */
funcs = (DWORD *)((char *)module + exports->AddressOfFunctions); funcs = (DWORD *)((char *)module + exports->AddressOfFunctions);
entry_point_rva = (const char *)descr->entry_point_base - (const char *)module; entry_point_rva = descr->entry_point_base - (const char *)module;
for (i = 0; i < exports->NumberOfFunctions; i++, funcs++) for (i = 0; i < exports->NumberOfFunctions; i++, funcs++)
{ {
if (!descr->entry_point_offsets[i]) continue; /* not a normal function */ if (!descr->entry_point_offsets[i]) continue; /* not a normal function */

View File

@ -67,7 +67,7 @@ static BOOLEAN copy_acl(DWORD nDestinationAclLength, PACL pDestinationAcl, PACL
if (!pSourceAcl || !RtlValidAcl(pSourceAcl)) if (!pSourceAcl || !RtlValidAcl(pSourceAcl))
return FALSE; return FALSE;
size = ((ACL *)pSourceAcl)->AclSize; size = pSourceAcl->AclSize;
if (nDestinationAclLength < size) if (nDestinationAclLength < size)
return FALSE; return FALSE;

View File

@ -148,7 +148,7 @@ static NTSTATUS add_work_item_to_queue(struct work_item *work_item)
{ {
HANDLE sem; HANDLE sem;
status = NtCreateSemaphore(&sem, SEMAPHORE_ALL_ACCESS, NULL, 1, LONG_MAX); status = NtCreateSemaphore(&sem, SEMAPHORE_ALL_ACCESS, NULL, 1, LONG_MAX);
if (interlocked_cmpxchg_ptr( (PVOID *)&work_item_event, (PVOID)sem, 0 )) if (interlocked_cmpxchg_ptr( (PVOID *)&work_item_event, sem, 0 ))
NtClose(sem); /* somebody beat us to it */ NtClose(sem); /* somebody beat us to it */
} }
else else