mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
base: use calloc
Make zalloc a wrapper over calloc
This commit is contained in:
parent
cb04b84c79
commit
8bb5dd5430
@ -20,10 +20,7 @@
|
|||||||
|
|
||||||
static inline void *zalloc(size_t len)
|
static inline void *zalloc(size_t len)
|
||||||
{
|
{
|
||||||
void *ptr = malloc(len);
|
return calloc(1, len);
|
||||||
if (ptr)
|
|
||||||
memset(ptr, 0, len);
|
|
||||||
return ptr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------
|
//----------------------------------------------------------------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user