]> sourceware.org Git - lvm2.git/commitdiff
Replace malloc with zalloc when creating segment_type's
authorJonathan Earl Brassow <jbrassow@redhat.com>
Fri, 25 Mar 2011 21:59:42 +0000 (21:59 +0000)
committerJonathan Earl Brassow <jbrassow@redhat.com>
Fri, 25 Mar 2011 21:59:42 +0000 (21:59 +0000)
lib/error/errseg.c
lib/freeseg/freeseg.c
lib/mirror/mirrored.c
lib/replicator/replicator.c
lib/snapshot/snapshot.c
lib/striped/striped.c
lib/unknown/unknown.c
lib/zero/zero.c

index add1df8cb7b2c37f2518b5cf9aac1b3d5b82fcf2..41e451b9ce438517d32545eac0e9149ed007981a 100644 (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;
index 8e73be0c6feb6fe862c0506ef5cda5c8984bd3d9..6fbad7ec73376232668a2d40ee6c386d8583aa44 100644 (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;
index 9da8efaa6bb540a97697ab98efc6df8c047f70ca..3c68adab130a15a037e005a03dba6d9ab4ba9b18 100644 (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;
index 26a5cf1c04eaea7da04e8592933c78dcca2f518d..2be49c2fca29c7338589a13d738d046c9f324f4e 100644 (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;
index af5d70895bf6213e3bd975d211bf9bc8e3daa9af..1b8b20ff5af85e51648b998c7559175736be36d4 100644 (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;
index 51bf24a1e320ee1787a181637d4cd61a4c08b399..4de4a1876724d01f99f7c18cd47b546a55bed7b7 100644 (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;
index 332ae99e09330656899e3998364e82c9f5a8432f..b2183717ad5300c679b8cc1e18bb63e93c9e37e3 100644 (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;
index 16ce66c40f504db8dd66a591b9385f772f9ca678..471bc11f952f5310bdf0a7b37b432c90556a57ec 100644 (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;
This page took 0.03745 seconds and 5 git commands to generate.