public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] alpha: Replace one-element array with flexible-array member
@ 2023-08-02 13:25 Gustavo A. R. Silva
  2023-08-15 20:02 ` Gustavo A. R. Silva
  2023-08-15 23:44 ` Kees Cook
  0 siblings, 2 replies; 3+ messages in thread
From: Gustavo A. R. Silva @ 2023-08-02 13:25 UTC (permalink / raw)
  To: Richard Henderson, Ivan Kokshaysky, Matt Turner
  Cc: linux-alpha, linux-kernel, Gustavo A. R. Silva, linux-hardening

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>
---
 arch/alpha/kernel/osf_sys.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c
index d98701ee36c6..5db88b627439 100644
--- a/arch/alpha/kernel/osf_sys.c
+++ b/arch/alpha/kernel/osf_sys.c
@@ -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 {
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-08-15 23:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-02 13:25 [PATCH] alpha: Replace one-element array with flexible-array member Gustavo A. R. Silva
2023-08-15 20:02 ` Gustavo A. R. Silva
2023-08-15 23:44 ` Kees Cook

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox