Author: fireball Date: Thu Jun 12 04:40:33 2008 New Revision: 33946
URL: http://svn.reactos.org/svn/reactos?rev=33946&view=rev Log: - Formatting cleanup for the previously patched functions.
Modified: trunk/reactos/lib/rtl/heap.c
Modified: trunk/reactos/lib/rtl/heap.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/heap.c?rev=33946&am... ============================================================================== --- trunk/reactos/lib/rtl/heap.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/heap.c [iso-8859-1] Thu Jun 12 04:40:33 2008 @@ -596,14 +596,12 @@ int i; NTSTATUS Status;
-#if 1 - if (address==NULL && ZwAllocateVirtualMemory( NtCurrentProcess(), &address, 0, + if (!address && ZwAllocateVirtualMemory( NtCurrentProcess(), &address, 0, &commitSize, MEM_COMMIT, PAGE_READWRITE )) { WARN("Could not commit %08lx bytes for sub-heap %p\n", commitSize, address ); return FALSE; } -#endif
/* Fill the sub-heap structure */
@@ -1596,26 +1594,21 @@ RtlEnumProcessHeaps(PHEAP_ENUMERATION_ROUTINE HeapEnumerationRoutine, PVOID lParam) { - -#if 1 - NTSTATUS Status = STATUS_SUCCESS; - - struct list *ptr=NULL; - RtlEnterHeapLock(&processHeap->critSection); - Status=HeapEnumerationRoutine(processHeap,lParam); - LIST_FOR_EACH( ptr, &processHeap->entry ) - { - if (!NT_SUCCESS(Status)) - break; - Status = HeapEnumerationRoutine(ptr,lParam); - - } - - - RtlLeaveHeapLock(&processHeap->critSection); - - return Status; -#endif + NTSTATUS Status = STATUS_SUCCESS; + + struct list *ptr=NULL; + RtlEnterHeapLock(&processHeap->critSection); + Status=HeapEnumerationRoutine(processHeap,lParam); + + LIST_FOR_EACH( ptr, &processHeap->entry ) + { + if (!NT_SUCCESS(Status)) break; + Status = HeapEnumerationRoutine(ptr,lParam); + } + + RtlLeaveHeapLock(&processHeap->critSection); + + return Status; }
@@ -1637,13 +1630,9 @@ i++; LIST_FOR_EACH( ptr, &processHeap->entry ) { - if(i>=count) - { - break; - } + if (i >= count) break; i++; *(heaps++) = LIST_ENTRY( ptr, HEAP, entry ); - } } RtlLeaveHeapLock( &processHeap->critSection ); @@ -1657,11 +1646,8 @@ BOOLEAN NTAPI RtlValidateProcessHeaps(VOID) { - -#if 1 BOOLEAN Result = TRUE; HEAP ** pptr; -
RtlEnterHeapLock( &processHeap->critSection );
@@ -1674,10 +1660,8 @@ } }
- - RtlLeaveHeapLock( &processHeap->critSection ); + RtlLeaveHeapLock( &processHeap->critSection ); return Result; -#endif }