mirror of
https://git.gfz-potsdam.de/naaice/iphreeqc.git
synced 2025-12-16 08:38:23 +01:00
memset not used for NDEBUG
git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@8891 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
parent
e168691097
commit
0236d42a7c
@ -27,8 +27,9 @@ PHRQ_malloc(size_t size)
|
||||
|
||||
if (p == NULL)
|
||||
return NULL;
|
||||
|
||||
#if !defined(NDEBUG)
|
||||
memset(p, 0, sizeof(PHRQMemHeader) + size);
|
||||
#endif
|
||||
p->pNext = NULL;
|
||||
|
||||
if ((p->pPrev = s_pTail) != NULL)
|
||||
@ -199,10 +200,12 @@ PHRQ_realloc(void *ptr, size_t size
|
||||
if (p != NULL)
|
||||
{
|
||||
p->size = new_size;
|
||||
#if !defined(NDEBUG)
|
||||
if (new_size > old_size)
|
||||
{
|
||||
memset((char *) p + old_size, 0, new_size - old_size);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if (p == NULL)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user