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