mirror of
https://github.com/reactos/reactos.git
synced 2024-08-14 15:16:27 +00:00
- Formatting cleanup for the previously patched functions.
svn path=/trunk/; revision=33946
This commit is contained in:
parent
3da8a2640d
commit
57da8d9f18
|
@ -596,14 +596,12 @@ static BOOL HEAP_InitSubHeap( HEAP *heap, LPVOID address, DWORD flags,
|
||||||
int i;
|
int i;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
|
||||||
#if 1
|
if (!address && ZwAllocateVirtualMemory( NtCurrentProcess(), &address, 0,
|
||||||
if (address==NULL && ZwAllocateVirtualMemory( NtCurrentProcess(), &address, 0,
|
|
||||||
&commitSize, MEM_COMMIT, PAGE_READWRITE ))
|
&commitSize, MEM_COMMIT, PAGE_READWRITE ))
|
||||||
{
|
{
|
||||||
WARN("Could not commit %08lx bytes for sub-heap %p\n", commitSize, address );
|
WARN("Could not commit %08lx bytes for sub-heap %p\n", commitSize, address );
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Fill the sub-heap structure */
|
/* Fill the sub-heap structure */
|
||||||
|
|
||||||
|
@ -1596,26 +1594,21 @@ NTSTATUS NTAPI
|
||||||
RtlEnumProcessHeaps(PHEAP_ENUMERATION_ROUTINE HeapEnumerationRoutine,
|
RtlEnumProcessHeaps(PHEAP_ENUMERATION_ROUTINE HeapEnumerationRoutine,
|
||||||
PVOID lParam)
|
PVOID lParam)
|
||||||
{
|
{
|
||||||
|
NTSTATUS Status = STATUS_SUCCESS;
|
||||||
|
|
||||||
#if 1
|
struct list *ptr=NULL;
|
||||||
NTSTATUS Status = STATUS_SUCCESS;
|
RtlEnterHeapLock(&processHeap->critSection);
|
||||||
|
Status=HeapEnumerationRoutine(processHeap,lParam);
|
||||||
|
|
||||||
struct list *ptr=NULL;
|
LIST_FOR_EACH( ptr, &processHeap->entry )
|
||||||
RtlEnterHeapLock(&processHeap->critSection);
|
{
|
||||||
Status=HeapEnumerationRoutine(processHeap,lParam);
|
if (!NT_SUCCESS(Status)) break;
|
||||||
LIST_FOR_EACH( ptr, &processHeap->entry )
|
Status = HeapEnumerationRoutine(ptr,lParam);
|
||||||
{
|
}
|
||||||
if (!NT_SUCCESS(Status))
|
|
||||||
break;
|
|
||||||
Status = HeapEnumerationRoutine(ptr,lParam);
|
|
||||||
|
|
||||||
}
|
RtlLeaveHeapLock(&processHeap->critSection);
|
||||||
|
|
||||||
|
return Status;
|
||||||
RtlLeaveHeapLock(&processHeap->critSection);
|
|
||||||
|
|
||||||
return Status;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1637,13 +1630,9 @@ RtlGetProcessHeaps(ULONG count,
|
||||||
i++;
|
i++;
|
||||||
LIST_FOR_EACH( ptr, &processHeap->entry )
|
LIST_FOR_EACH( ptr, &processHeap->entry )
|
||||||
{
|
{
|
||||||
if(i>=count)
|
if (i >= count) break;
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
i++;
|
i++;
|
||||||
*(heaps++) = LIST_ENTRY( ptr, HEAP, entry );
|
*(heaps++) = LIST_ENTRY( ptr, HEAP, entry );
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
RtlLeaveHeapLock( &processHeap->critSection );
|
RtlLeaveHeapLock( &processHeap->critSection );
|
||||||
|
@ -1657,12 +1646,9 @@ RtlGetProcessHeaps(ULONG count,
|
||||||
BOOLEAN NTAPI
|
BOOLEAN NTAPI
|
||||||
RtlValidateProcessHeaps(VOID)
|
RtlValidateProcessHeaps(VOID)
|
||||||
{
|
{
|
||||||
|
|
||||||
#if 1
|
|
||||||
BOOLEAN Result = TRUE;
|
BOOLEAN Result = TRUE;
|
||||||
HEAP ** pptr;
|
HEAP ** pptr;
|
||||||
|
|
||||||
|
|
||||||
RtlEnterHeapLock( &processHeap->critSection );
|
RtlEnterHeapLock( &processHeap->critSection );
|
||||||
|
|
||||||
for (pptr = (HEAP**)&NtCurrentPeb()->ProcessHeaps; *pptr; pptr++)
|
for (pptr = (HEAP**)&NtCurrentPeb()->ProcessHeaps; *pptr; pptr++)
|
||||||
|
@ -1674,10 +1660,8 @@ RtlValidateProcessHeaps(VOID)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RtlLeaveHeapLock( &processHeap->critSection );
|
||||||
RtlLeaveHeapLock( &processHeap->critSection );
|
|
||||||
return Result;
|
return Result;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue