From a1796afa517854566c59aec393cdf868b3fd45bf Mon Sep 17 00:00:00 2001 From: meep-eep Date: Sat, 19 Nov 2005 22:28:49 +0000 Subject: [PATCH] Comment about C (non-)compatibility of HRealloc(). git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2002 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/src/sc2code/libs/memory/w_memlib.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sc2/src/sc2code/libs/memory/w_memlib.c b/sc2/src/sc2code/libs/memory/w_memlib.c index 46ccc2124..4dc04b395 100644 --- a/sc2/src/sc2code/libs/memory/w_memlib.c +++ b/sc2/src/sc2code/libs/memory/w_memlib.c @@ -672,6 +672,9 @@ HCalloc (int size) return (p); } +// BUG: HRealloc() is does not behave like realloc(): +// From the C standard: "If memory for the new object cannot be allocated, +// the old object is not deallocated and its value is unchanged." void * HRealloc (void *p, int size) {