get_acorn_filename(): deobfuscate a bit
authorAl Viro <viro@zeniv.linux.org.uk>
Thu, 5 May 2016 14:48:47 +0000 (10:48 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 9 May 2016 15:42:20 +0000 (11:42 -0400)
Lots of Idiotic Silly Parentheses is -> that way...  What that
condition checks is that there's exactly 32 bytes between the
end of name and the end of entire drectory record.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/isofs/dir.c

index b943cbd..dfd14e1 100644 (file)
@@ -58,7 +58,7 @@ int get_acorn_filename(struct iso_directory_record *de,
        std = sizeof(struct iso_directory_record) + de->name_len[0];
        if (std & 1)
                std++;
-       if ((*((unsigned char *) de) - std) != 32)
+       if (de->length[0] - std != 32)
                return retnamlen;
        chr = ((unsigned char *) de) + std;
        if (strncmp(chr, "ARCHIMEDES", 10))