1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-02-08 09:25:49 +01:00

Changed wrealloc's behaviour to call wfree() and return NULL if the newly

requested size is 0.
This commit is contained in:
dan
1999-12-06 02:12:30 +00:00
parent 34c926186c
commit 4b69ea222e
2 changed files with 7 additions and 0 deletions

View File

@@ -114,6 +114,9 @@ void *wrealloc(void *ptr, size_t newsize)
if (!ptr) {
nptr = wmalloc(newsize);
} else if (newsize==0) {
wfree(ptr);
nptr = NULL;
} else {
#ifdef TEST_WITH_GC
nptr = GC_realloc(ptr, newsize);