Skip to content

Commit 7fac96f

Browse files
tracing/probe: 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 9f162d9 commit 7fac96f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎kernel/trace/trace_probe.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ struct trace_probe_event {
236236
struct trace_event_call call;
237237
struct list_head files;
238238
struct list_head probes;
239-
struct trace_uprobe_filter filter[0];
239+
struct trace_uprobe_filter filter[];
240240
};
241241

242242
struct trace_probe {

0 commit comments

Comments
 (0)