]> git.dujemihanovic.xyz Git - linux.git/commitdiff
affs: Replace one-element array with flexible-array member
authorThorsten Blum <thorsten.blum@toblux.com>
Tue, 27 Aug 2024 12:48:40 +0000 (14:48 +0200)
committerDavid Sterba <dsterba@suse.com>
Fri, 6 Sep 2024 15:48:15 +0000 (17:48 +0200)
Replace the deprecated one-element array with a modern flexible-array
member in the struct affs_root_head.

Add a comment that most struct members are not used, but kept as
documentation.

Link: https://github.com/KSPP/linux/issues/79
Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/affs/amigaffs.h

index 1b973a669d2354ae3d6d6829f5b3458a6c6c0daf..da3217ab6adbce123ba61a7e991e9a6eb975b717 100644 (file)
@@ -49,12 +49,13 @@ struct affs_short_date {
 
 struct affs_root_head {
        __be32 ptype;
+       /* The following fields are not used, but kept as documentation. */
        __be32 spare1;
        __be32 spare2;
        __be32 hash_size;
        __be32 spare3;
        __be32 checksum;
-       __be32 hashtable[1];
+       __be32 hashtable[];
 };
 
 struct affs_root_tail {