mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] vt: use flexible-array member instead of zero-length array
@ 2020-12-31 12:04 Tian Tao
  2020-12-31 14:49 ` kernel test robot
  2020-12-31 14:53 ` Greg KH
  0 siblings, 2 replies; 3+ messages in thread
From: Tian Tao @ 2020-12-31 12:04 UTC (permalink / raw)
  To: gregkh, jirislaby; +Cc: linux-kernel

Use flexible-array member introduced in C99 instead of zero-length
array. Most of zero-length array was already taken care in previous
patch [1]. Now modified few more cases which were not handled earlier.

[1]. https://patchwork.kernel.org/patch/11394197/

Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
---
 drivers/tty/vt/vt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
index d04a162..86b4c5f 100644
--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -332,7 +332,7 @@ typedef uint32_t char32_t;
  * scrolling only implies some pointer shuffling.
  */
 struct uni_screen {
-	char32_t *lines[0];
+	char32_t *lines[];
 };
 
 static struct uni_screen *vc_uniscr_alloc(unsigned int cols, unsigned int rows)
-- 
2.7.4


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

end of thread, other threads:[~2020-12-31 14:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-31 12:04 [PATCH] vt: use flexible-array member instead of zero-length array Tian Tao
2020-12-31 14:49 ` kernel test robot
2020-12-31 14:53 ` Greg KH

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

all inboxes | Powered by JetHome®