diff options
author | Neil Brown <neilb@suse.de> | 2008-07-12 20:27:36 +1000 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2008-07-12 20:27:36 +1000 |
commit | ef609477203013666d186cf913e93f4a8843b6db (patch) | |
tree | 527f675f416c53dbc5e031d634573d6a9e89fad7 /super1.c | |
parent | 904c1ef77bcb3e3b151f544acf104cd36acdc5f6 (diff) | |
download | mdadm-ef609477203013666d186cf913e93f4a8843b6db.tar.gz mdadm-ef609477203013666d186cf913e93f4a8843b6db.tar.xz mdadm-ef609477203013666d186cf913e93f4a8843b6db.zip |
Always initialise a struct super_type to zero
Diffstat (limited to 'super1.c')
-rw-r--r-- | super1.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1073,8 +1073,8 @@ static int load_super1(struct supertype *st, int fd, char *devname) struct supertype tst; __u64 bestctime = 0; /* guess... choose latest ctime */ + memset(&tst, 0, sizeof(tst)); tst.ss = &super1; - tst.sb = NULL; for (tst.minor_version = 0; tst.minor_version <= 2 ; tst.minor_version++) { switch(load_super1(&tst, fd, devname)) { case 0: super = tst.sb; @@ -1216,6 +1216,7 @@ static struct supertype *match_metadata_desc1(char *arg) struct supertype *st = malloc(sizeof(*st)); if (!st) return st; + memset(st, 0, sizeof(*st)); st->ss = &super1; st->max_devs = 384; st->sb = NULL; |