]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Move a variable declaration to the declaration area.
authorPaul Clements <paul.clements@steeleye.com>
Tue, 20 Jun 2006 00:01:47 +0000 (10:01 +1000)
committerNeil Brown <neilb@suse.de>
Tue, 20 Jun 2006 00:01:47 +0000 (10:01 +1000)
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>

super1.c

index 467ff68b932f0673a42bb0d471100f0006174e4e..bcfe573567bceff5568243baea7ca93e2103b5c7 100644 (file)
--- 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);