1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

Replace malloc with zalloc when creating segment_type's

This commit is contained in:
Jonathan Earl Brassow 2011-03-25 21:59:42 +00:00
parent 09c4fd3f55
commit 58bdd1654b
8 changed files with 9 additions and 9 deletions

View File

@ -99,7 +99,7 @@ static struct segtype_handler _error_ops = {
struct segment_type *init_error_segtype(struct cmd_context *cmd)
{
struct segment_type *segtype = dm_malloc(sizeof(*segtype));
struct segment_type *segtype = dm_zalloc(sizeof(*segtype));
if (!segtype)
return_NULL;

View File

@ -43,7 +43,7 @@ static struct segtype_handler _freeseg_ops = {
struct segment_type *init_free_segtype(struct cmd_context *cmd)
{
struct segment_type *segtype = dm_malloc(sizeof(*segtype));
struct segment_type *segtype = dm_zalloc(sizeof(*segtype));
if (!segtype)
return_NULL;

View File

@ -630,7 +630,7 @@ struct segment_type *init_segtype(struct cmd_context *cmd);
struct segment_type *init_segtype(struct cmd_context *cmd)
#endif
{
struct segment_type *segtype = dm_malloc(sizeof(*segtype));
struct segment_type *segtype = dm_zalloc(sizeof(*segtype));
if (!segtype)
return_NULL;

View File

@ -760,7 +760,7 @@ int init_multiple_segtype(struct segtype_library *seglib)
{
struct segment_type *segtype;
if (!(segtype = dm_malloc(sizeof(*segtype))))
if (!(segtype = dm_zalloc(sizeof(*segtype))))
return_0;
segtype->ops = &_replicator_ops;
@ -773,7 +773,7 @@ int init_multiple_segtype(struct segtype_library *seglib)
log_very_verbose("Initialised segtype: " REPLICATOR_MODULE);
if (!(segtype = dm_malloc(sizeof(*segtype))))
if (!(segtype = dm_zalloc(sizeof(*segtype))))
return_0;
segtype->ops = &_replicator_dev_ops;

View File

@ -249,7 +249,7 @@ struct segment_type *init_segtype(struct cmd_context *cmd);
struct segment_type *init_segtype(struct cmd_context *cmd)
#endif
{
struct segment_type *segtype = dm_malloc(sizeof(*segtype));
struct segment_type *segtype = dm_zalloc(sizeof(*segtype));
if (!segtype)
return_NULL;

View File

@ -220,7 +220,7 @@ static struct segtype_handler _striped_ops = {
struct segment_type *init_striped_segtype(struct cmd_context *cmd)
{
struct segment_type *segtype = dm_malloc(sizeof(*segtype));
struct segment_type *segtype = dm_zalloc(sizeof(*segtype));
if (!segtype)
return_NULL;

View File

@ -91,7 +91,7 @@ static struct segtype_handler _unknown_ops = {
struct segment_type *init_unknown_segtype(struct cmd_context *cmd, const char *name)
{
struct segment_type *segtype = dm_malloc(sizeof(*segtype));
struct segment_type *segtype = dm_zalloc(sizeof(*segtype));
if (!segtype)
return_NULL;

View File

@ -96,7 +96,7 @@ static struct segtype_handler _zero_ops = {
struct segment_type *init_zero_segtype(struct cmd_context *cmd)
{
struct segment_type *segtype = dm_malloc(sizeof(*segtype));
struct segment_type *segtype = dm_zalloc(sizeof(*segtype));
if (!segtype)
return_NULL;