Skip to content

Commit

Permalink
alpha: Replace one-element array with flexible-array member
Browse files Browse the repository at this point in the history
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" <[email protected]>
Link: https://lore.kernel.org/r/ZMpZZBShlLqyD3ax@work
Signed-off-by: Kees Cook <[email protected]>
  • Loading branch information
GustavoARSilva authored and kees committed Aug 15, 2023
1 parent aa9f10d commit 967afdf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/alpha/kernel/osf_sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 967afdf

Please sign in to comment.