]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit
e2fsprogs: Add memory allocation and zero-out helpers
authorLukas Czerner <lczerner@redhat.com>
Wed, 18 May 2011 12:19:52 +0000 (14:19 +0200)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 18 May 2011 15:41:02 +0000 (11:41 -0400)
commitffec46fea48f1f05fbe2fb863b44fd2dd718c50f
tree99fa5a75dc1a5b67fa5aba3a7cbe136cbb212ea4
parentf5ae5b3a12a052c70f139d3f8431d3eb25ccae3b
e2fsprogs: Add memory allocation and zero-out helpers

Add functions ext2fs_get_memzero() which will malloc() the memory
using ext2fs_get_mem(), but it will zero the allocated memory afterwards
with memset().

Add function ext2fs_get_arrayzero() which will use calloc() for
allocating and zero-out the array.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/ext2fs/ext2fs.h