aboutsummaryrefslogtreecommitdiffstats
path: root/memory/calloc.c
blob: c14b1507551f8555a12d0d3ed97be836693acf2d (plain) (blame)
1
2
3
4
5
6
7
8
9
#include "memory.h"

void *calloc(size_t count, size_t size)
{
	void *ptr = reallocarray(NULL, count, size);
	if (ptr != NULL)
		memset(ptr, 0, count * size);
	return ptr;
}