summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Clements <paul.clements@steeleye.com>2006-06-20 10:01:47 +1000
committerNeil Brown <neilb@suse.de>2006-06-20 10:01:47 +1000
commitb015e6c26833982f313d8684d7ba161ae06d63b9 (patch)
treeaf0d9015935c5132bc6432e283eda46919effe0e
parente81cdd9f3794d2b4452ae2297c43e16e3faf6f6a (diff)
downloadmdadm-b015e6c26833982f313d8684d7ba161ae06d63b9.tar.gz
mdadm-b015e6c26833982f313d8684d7ba161ae06d63b9.tar.xz
mdadm-b015e6c26833982f313d8684d7ba161ae06d63b9.zip
Move a variable declaration to the declaration area.
While declaring variables in the middle of code withs with newer gcc's it doesn't work with older, and it is arguably less readable, so just do the right thing. From: Paul Clements <paul.clements@steeleye.com>
-rw-r--r--super1.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/super1.c b/super1.c
index 467ff68..bcfe573 100644
--- a/super1.c
+++ b/super1.c
@@ -311,6 +311,7 @@ static void brief_examine_super1(void *sbv)
struct mdp_superblock_1 *sb = sbv;
int i;
char *nm;
+ char *c=map_num(pers, __le32_to_cpu(sb->level));
nm = strchr(sb->set_name, ':');
if (nm)
@@ -320,8 +321,6 @@ static void brief_examine_super1(void *sbv)
else
nm = "??";
- char *c=map_num(pers, __le32_to_cpu(sb->level));
-
printf("ARRAY /dev/md/%s level=%s metadata=1 num-devices=%d UUID=",
nm,
c?c:"-unknown-", sb->raid_disks);