Author: fireball
Date: Tue Mar 22 16:27:41 2011
New Revision: 51119
URL:
http://svn.reactos.org/svn/reactos?rev=51119&view=rev
Log:
[RTL/HEAP]
- Thomas Faber: Use macro instead of manually removing item from the list.
See issue #6016 for more details.
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=51119&a…
==============================================================================
--- trunk/reactos/lib/rtl/heap.c [iso-8859-1] (original)
+++ trunk/reactos/lib/rtl/heap.c [iso-8859-1] Tue Mar 22 16:27:41 2011
@@ -341,18 +341,9 @@
BOOLEAN NoFill)
{
SIZE_T Result, RealSize;
- PLIST_ENTRY OldBlink, OldFlink;
-
- // FIXME: Maybe use RemoveEntryList?
-
- /* Remove the free block */
- OldFlink = FreeEntry->FreeList.Flink;
- OldBlink = FreeEntry->FreeList.Blink;
- OldBlink->Flink = OldFlink;
- OldFlink->Blink = OldBlink;
-
- /* Update the freelists bitmap */
- if ((OldFlink == OldBlink) &&
+
+ /* Remove the free block and update the freelists bitmap */
+ if (RemoveEntryList(&FreeEntry->FreeList) &&
(Dedicated || (!Dedicated && FreeEntry->Size < HEAP_FREELISTS)))
{
RtlpClearFreeListsBit(Heap, FreeEntry);