From 17854c4e8702febaa8fe4adfbc678f9abaaa52c7 Mon Sep 17 00:00:00 2001
From: Xiaohong Bao <bao@lindenlab.com>
Date: Mon, 4 Apr 2011 14:40:07 -0600
Subject: [PATCH] fix an issue on mac and linux, also fix an assertion.

---
 indra/llcommon/llmemory.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/indra/llcommon/llmemory.cpp b/indra/llcommon/llmemory.cpp
index 62db7e33852..dfc00b5e0ae 100644
--- a/indra/llcommon/llmemory.cpp
+++ b/indra/llcommon/llmemory.cpp
@@ -142,7 +142,7 @@ void* LLMemory::tryToAlloc(void* address, U32 size)
 	}
 	return address ;
 #else
-	return 0x01 ; //skip checking
+	return (void*)0x01 ; //skip checking
 #endif	
 }
 
@@ -1079,6 +1079,8 @@ LLPrivateMemoryPool::LLMemoryBlock* LLPrivateMemoryPool::LLMemoryChunk::createNe
 	if(new_free_blk_size > 0) //blk still has free space
 	{
 		LLMemoryBlock* next_blk = blk + (buffer_size / mMinBlockSize) ;
+		next_blk->mPrev = NULL ;
+		next_blk->mNext = NULL ;
 		next_blk->setBuffer(blk->getBuffer() + buffer_size, new_free_blk_size) ;
 		addToFreeSpace(next_blk) ;
 	}
-- 
GitLab