summaryrefslogtreecommitdiff
path: root/Incremental.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2011-06-08 15:54:13 +1000
committerNeilBrown <neilb@suse.de>2011-06-08 15:54:13 +1000
commit95eeceeb32775bffd06771c81c3dee547af0d62f (patch)
treeedc54e03ccb4f86386768ef13b8b4d592876d80e /Incremental.c
parent58b3c6976a61ed5481d3b67548b4f2fe43b86165 (diff)
getinfo_super now clears the 'info' structure before filling it in.
Some code currently clears 'info' before calling getinfo_super, some code doesn't. To be consistent, change it so no caller ever clears 'info', but ever getinfo_super function must clear it. Note that ->raid_disk may be meaningful if that 'map' is passed non-NULL. In that case it is copied out before the structure is zeroed. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'Incremental.c')
-rw-r--r--Incremental.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/Incremental.c b/Incremental.c
index 14184da0..f576cbae 100644
--- a/Incremental.c
+++ b/Incremental.c
@@ -202,7 +202,6 @@ int Incremental(char *devname, int verbose, int runstop,
}
close (dfd); dfd = -1;
- memset(&info, 0, sizeof(info));
st->ss->getinfo_super(st, &info, NULL);
/* 3/ Check if there is a match in mdadm.conf */
@@ -396,7 +395,6 @@ int Incremental(char *devname, int verbose, int runstop,
goto out;
}
close(dfd2);
- memset(&info2, 0, sizeof(info2));
st2->ss->getinfo_super(st2, &info2, NULL);
st2->ss->free_super(st2);
if (info.array.level != info2.array.level ||
@@ -1435,7 +1433,6 @@ static int Incremental_container(struct supertype *st, char *devname,
int suuid[4];
int sfd;
- memset(&info, 0, sizeof(info));
st->ss->getinfo_super(st, &info, NULL);
if ((runstop > 0 && info.container_enough >= 0) ||