Messages in this thread | | | Subject | Re: [PATCH] tty: Replace zero-length array with flexible-array | From | Jiri Slaby <> | Date | Mon, 11 May 2020 08:07:14 +0200 |
| |
On 07. 05. 20, 21:25, Gustavo A. R. Silva wrote: > The current codebase makes use of the zero-length array language > extension to the C90 standard, but the preferred mechanism to declare > variable-length types such as these ones is a flexible array member[1][2], > introduced in C99: > > struct foo { > int stuff; > struct boo array[]; > }; ...
Acked-by: Jiri Slaby <jslaby@suse.cz>
> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> > --- > include/linux/tty.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/linux/tty.h b/include/linux/tty.h > index bd5fe0e907e8..a99e9b8e4e31 100644 > --- a/include/linux/tty.h > +++ b/include/linux/tty.h > @@ -66,7 +66,7 @@ struct tty_buffer { > int read; > int flags; > /* Data points here */ > - unsigned long data[0]; > + unsigned long data[]; > }; > > /* Values for .flags field of tty_buffer */ >
thanks, -- js suse labs
| |