From 603cb55f1a4c20d28b8d4487d5bab032c8d47036 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Tue, 7 Aug 2012 16:40:29 +0800 Subject: [PATCH] Kernel - Fixed heap returning (void*)-1 instead of NULL on error --- KernelLand/Kernel/heap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/KernelLand/Kernel/heap.c b/KernelLand/Kernel/heap.c index 4c7ffd95..af2bde49 100644 --- a/KernelLand/Kernel/heap.c +++ b/KernelLand/Kernel/heap.c @@ -153,8 +153,8 @@ void *Heap_Allocate(const char *File, int Line, size_t __Bytes) size_t Bytes; if( __Bytes == 0 ) { - //return NULL; // TODO: Return a known un-mapped range. - return INVLPTR; + return NULL; // TODO: Return a known un-mapped range. +// return INVLPTR; } // Get required size -- 2.20.1