HPFS: Move declaration up, so that there are no out-of-scope pointers
authorMikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
Sun, 8 May 2011 18:44:38 +0000 (20:44 +0200)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 9 May 2011 16:04:24 +0000 (09:04 -0700)
Move declaration up, so that there are no out-of-scope pointers

Reported-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/hpfs/ea.c

index 7f1d90ca5eeb5926d69e8424d165bf2d7966c50e..d8b84d113c891bbcfd8416d3f35153983b0549a7 100644 (file)
@@ -76,6 +76,7 @@ int hpfs_read_ea(struct super_block *s, struct fnode *fnode, char *key,
        unsigned pos;
        int ano, len;
        secno a;
+       char ex[4 + 255 + 1 + 8];
        struct extended_attribute *ea;
        struct extended_attribute *ea_end = fnode_end_ea(fnode);
        for (ea = fnode_ea(fnode); ea < ea_end; ea = next_ea(ea))
@@ -93,7 +94,6 @@ int hpfs_read_ea(struct super_block *s, struct fnode *fnode, char *key,
        ano = fnode->ea_anode;
        pos = 0;
        while (pos < len) {
-               char ex[4 + 255 + 1 + 8];
                ea = (struct extended_attribute *)ex;
                if (pos + 4 > len) {
                        hpfs_error(s, "EAs don't end correctly, %s %08x, len %08x",