From 95eeceeb32775bffd06771c81c3dee547af0d62f Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Wed, 8 Jun 2011 15:54:13 +1000 Subject: 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 --- Assemble.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'Assemble.c') diff --git a/Assemble.c b/Assemble.c index 8b05829d..250a6e0e 100644 --- a/Assemble.c +++ b/Assemble.c @@ -418,7 +418,6 @@ int Assemble(struct supertype *st, char *mddev, int uuid[4]; content = &info; - memset(content, 0, sizeof(*content)); tst->ss->getinfo_super(tst, content, NULL); if (!parse_uuid(ident->container, uuid) || @@ -484,7 +483,6 @@ int Assemble(struct supertype *st, char *mddev, } else { content = &info; - memset(content, 0, sizeof(*content)); tst->ss->getinfo_super(tst, content, NULL); if (!ident_matches(ident, content, tst, -- cgit v1.2.3