]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
alpha: Replace one-element array with flexible-array member
authorGustavo A. R. Silva <gustavoars@kernel.org>
Wed, 2 Aug 2023 13:25:56 +0000 (07:25 -0600)
committerKees Cook <keescook@chromium.org>
Tue, 15 Aug 2023 23:43:54 +0000 (16:43 -0700)
One-element and zero-length arrays are deprecated. So, replace
one-element array in struct osf_dirent with flexible-array
member.

This results in no differences in binary output.

Signed-off-by: "Gustavo A. R. Silva" <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/ZMpZZBShlLqyD3ax@work
Signed-off-by: Kees Cook <keescook@chromium.org>
arch/alpha/kernel/osf_sys.c

index d98701ee36c6a82f4c7385720f26b2dc356d3a2e..5db88b6274396d6c379a8ac7940fa4a22e069404 100644 (file)
@@ -97,7 +97,7 @@ struct osf_dirent {
        unsigned int d_ino;
        unsigned short d_reclen;
        unsigned short d_namlen;
-       char d_name[1];
+       char d_name[];
 };
 
 struct osf_dirent_callback {