[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
The first ASSERT in _al_sane_realloc() seems to conflict with the semantics
of the function:
void *_al_sane_realloc(void *ptr, size_t size)
{
void *tmp_ptr;
ASSERT(ptr);
ASSERT(size >= 0);
tmp_ptr = NULL;
if (ptr && size) {
tmp_ptr = realloc(ptr, size);
if (!tmp_ptr && ptr) free(ptr);
}
else if (!size) {
tmp_ptr = NULL;
if (ptr) free(ptr);
}
else if (!ptr) {
tmp_ptr = malloc(size);
}
return tmp_ptr;
}
It triggers in the test program compiled with DJGPP. I removed it for the
4.1.2 WIP release.
--
Eric Botcazou