ntdll: Remove unneeded casts.
This commit is contained in:
parent
8402f7a437
commit
1ebe82af65
|
@ -209,7 +209,7 @@ static inline HANDLE get_semaphore( RTL_CRITICAL_SECTION *crit )
|
|||
HANDLE sem;
|
||||
if (NtCreateSemaphore( &sem, SEMAPHORE_ALL_ACCESS, NULL, 0, 1 )) return 0;
|
||||
if (!(ret = (HANDLE)interlocked_cmpxchg_ptr( (PVOID *)&crit->LockSemaphore,
|
||||
(PVOID)sem, 0 )))
|
||||
sem, 0 )))
|
||||
ret = sem;
|
||||
else
|
||||
NtClose(sem); /* somebody beat us to it */
|
||||
|
|
|
@ -1621,8 +1621,8 @@ NTSTATUS WINAPI RtlWalkHeap( HANDLE heap, PVOID entry_ptr )
|
|||
ptr = entry->lpData;
|
||||
LIST_FOR_EACH_ENTRY( sub, &heapPtr->subheap_list, SUBHEAP, entry )
|
||||
{
|
||||
if (((char *)ptr >= (char *)sub->base) &&
|
||||
((char *)ptr < (char *)sub->base + sub->size))
|
||||
if ((ptr >= (char *)sub->base) &&
|
||||
(ptr < (char *)sub->base + sub->size))
|
||||
{
|
||||
currentheap = sub;
|
||||
break;
|
||||
|
|
|
@ -833,7 +833,7 @@ NTSTATUS WINAPI RtlFormatCurrentUserKeyPath( IN OUT PUNICODE_STRING KeyPath)
|
|||
KeyPath->Buffer = (PWCHAR)((LPBYTE)buf + sizeof(pathW));
|
||||
status = RtlConvertSidToUnicodeString(KeyPath,
|
||||
((TOKEN_USER *)buffer)->User.Sid, FALSE);
|
||||
KeyPath->Buffer = (PWCHAR)buf;
|
||||
KeyPath->Buffer = buf;
|
||||
KeyPath->Length += sizeof(pathW);
|
||||
KeyPath->MaximumLength += sizeof(pathW);
|
||||
}
|
||||
|
|
|
@ -526,7 +526,7 @@ void RELAY_SetupDLL( HMODULE module )
|
|||
/* patch the functions in the export table to point to the relay thunks */
|
||||
|
||||
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++)
|
||||
{
|
||||
if (!descr->entry_point_offsets[i]) continue; /* not a normal function */
|
||||
|
|
|
@ -66,8 +66,8 @@ static BOOLEAN copy_acl(DWORD nDestinationAclLength, PACL pDestinationAcl, PACL
|
|||
|
||||
if (!pSourceAcl || !RtlValidAcl(pSourceAcl))
|
||||
return FALSE;
|
||||
|
||||
size = ((ACL *)pSourceAcl)->AclSize;
|
||||
|
||||
size = pSourceAcl->AclSize;
|
||||
if (nDestinationAclLength < size)
|
||||
return FALSE;
|
||||
|
||||
|
|
|
@ -148,7 +148,7 @@ static NTSTATUS add_work_item_to_queue(struct work_item *work_item)
|
|||
{
|
||||
HANDLE sem;
|
||||
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 */
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue