Kernel - Fixed heap returning (void*)-1 instead of NULL on error
authorJohn Hodge <[email protected]>
Tue, 7 Aug 2012 08:40:29 +0000 (16:40 +0800)
committerJohn Hodge <[email protected]>
Tue, 7 Aug 2012 08:40:29 +0000 (16:40 +0800)
KernelLand/Kernel/heap.c

index 4c7ffd9..af2bde4 100644 (file)
@@ -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

UCC git Repository :: git.ucc.asn.au