move M_Calloc out of the #ifndef BSD etc... block.

This commit is contained in:
Christoph Oelckers 2023-11-11 21:51:30 +01:00
parent f399caa69d
commit f4e479d39d

View file

@ -78,13 +78,6 @@ void *M_Realloc(void *memblock, size_t size)
return block;
}
void* M_Calloc(size_t v1, size_t v2)
{
auto p = M_Malloc(v1 * v2);
memset(p, 0, v1 * v2);
return p;
}
#else
void *M_Malloc(size_t size)
{
@ -121,6 +114,14 @@ void *M_Realloc(void *memblock, size_t size)
return block;
}
#endif
void* M_Calloc(size_t v1, size_t v2)
{
auto p = M_Malloc(v1 * v2);
memset(p, 0, v1 * v2);
return p;
}
#else
#ifdef _MSC_VER
#include <crtdbg.h>