summaryrefslogtreecommitdiffstats
path: root/super-ddf.c
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2008-07-12 20:27:36 +1000
committerNeil Brown <neilb@suse.de>2008-07-12 20:27:36 +1000
commitef609477203013666d186cf913e93f4a8843b6db (patch)
tree527f675f416c53dbc5e031d634573d6a9e89fad7 /super-ddf.c
parent904c1ef77bcb3e3b151f544acf104cd36acdc5f6 (diff)
downloadmdadm-ef609477203013666d186cf913e93f4a8843b6db.tar.gz
mdadm-ef609477203013666d186cf913e93f4a8843b6db.tar.xz
mdadm-ef609477203013666d186cf913e93f4a8843b6db.zip
Always initialise a struct super_type to zero
Diffstat (limited to 'super-ddf.c')
-rw-r--r--super-ddf.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/super-ddf.c b/super-ddf.c
index 339db9f..0c2a013 100644
--- a/super-ddf.c
+++ b/super-ddf.c
@@ -820,6 +820,7 @@ static struct supertype *match_metadata_desc_ddf(char *arg)
return NULL;
st = malloc(sizeof(*st));
+ memset(st, 0, sizeof(*st));
st->ss = &super_ddf;
st->max_devs = 512;
st->minor_version = 0;
@@ -837,6 +838,7 @@ static struct supertype *match_metadata_desc_ddf_bvd(char *arg)
return NULL;
st = malloc(sizeof(*st));
+ memset(st, 0, sizeof(*st));
st->ss = &super_ddf_bvd;
st->max_devs = 512;
st->minor_version = 0;
@@ -853,6 +855,7 @@ static struct supertype *match_metadata_desc_ddf_svd(char *arg)
return NULL;
st = malloc(sizeof(*st));
+ memset(st, 0, sizeof(*st));
st->ss = &super_ddf_svd;
st->max_devs = 512;
st->minor_version = 0;