Use calloc(3) instead of rolling our own.
This commit is contained in:
parent
dfe793e9cc
commit
c3e0cfa4d5
@ -38,10 +38,9 @@ zmalloc(size_t size)
|
||||
{
|
||||
void *ptr;
|
||||
|
||||
ptr = malloc(size);
|
||||
ptr = calloc(1, size);
|
||||
if (!ptr)
|
||||
err(EX_OSERR, "malloc() failed");
|
||||
bzero(ptr, size);
|
||||
|
||||
return ptr;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user