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