Author: sir_richard
Date: Sat Jun 5 19:54:19 2010
New Revision: 47595
URL:
http://svn.reactos.org/svn/reactos?rev=47595&view=rev
Log:
[NTOS]: Defensive programming on the pool macros.
Modified:
trunk/reactos/ntoskrnl/mm/ARM3/expool.c
Modified: trunk/reactos/ntoskrnl/mm/ARM3/expool.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/expool.c?…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/ARM3/expool.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/expool.c [iso-8859-1] Sat Jun 5 19:54:19 2010
@@ -29,11 +29,11 @@
PKGUARDED_MUTEX ExpPagedPoolMutex;
/* Pool block/header/list access macros */
-#define POOL_ENTRY(x) (PPOOL_HEADER)((ULONG_PTR)x - sizeof(POOL_HEADER))
-#define POOL_FREE_BLOCK(x) (PLIST_ENTRY)((ULONG_PTR)x + sizeof(POOL_HEADER))
-#define POOL_BLOCK(x, i) (PPOOL_HEADER)((ULONG_PTR)x + ((i) * POOL_BLOCK_SIZE))
-#define POOL_NEXT_BLOCK(x) POOL_BLOCK(x, x->BlockSize)
-#define POOL_PREV_BLOCK(x) POOL_BLOCK(x, -x->PreviousSize)
+#define POOL_ENTRY(x) (PPOOL_HEADER)((ULONG_PTR)(x) - sizeof(POOL_HEADER))
+#define POOL_FREE_BLOCK(x) (PLIST_ENTRY)((ULONG_PTR)(x) + sizeof(POOL_HEADER))
+#define POOL_BLOCK(x, i) (PPOOL_HEADER)((ULONG_PTR)(x) + ((i) * POOL_BLOCK_SIZE))
+#define POOL_NEXT_BLOCK(x) POOL_BLOCK((x), (x)->BlockSize)
+#define POOL_PREV_BLOCK(x) POOL_BLOCK((x), -(x)->PreviousSize)
/* PRIVATE FUNCTIONS **********************************************************/