Skip to content

Commit 241cb28

Browse files
aio: Replace zero-length array with flexible-array
There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use “flexible array members”[1] for these cases. The older style of one-element or zero-length arrays should no longer be used[2]. [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] KSPP/linux#21 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
1 parent aa125f3 commit 241cb28

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎fs/aio.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ struct aio_ring {
6767
unsigned header_length; /* size of aio_ring */
6868

6969

70-
struct io_event io_events[0];
70+
struct io_event io_events[];
7171
}; /* 128 bytes + ring size */
7272

7373
/*

0 commit comments

Comments
 (0)