summaryrefslogtreecommitdiffstats
path: root/samples
diff options
context:
space:
mode:
authorAlexei Starovoitov <ast@fb.com>2016-04-28 03:56:22 +0200
committerDavid S. Miller <davem@davemloft.net>2016-04-28 23:29:45 +0200
commit569cc39d39385a74b23145496bca2df5ac8b2fb8 (patch)
treed19ff13218ada2b400bece7a058919478afea9ce /samples
parentbpf: fix check_map_func_compatibility logic (diff)
downloadlinux-569cc39d39385a74b23145496bca2df5ac8b2fb8.tar.xz
linux-569cc39d39385a74b23145496bca2df5ac8b2fb8.zip
samples/bpf: fix trace_output example
llvm cannot always recognize memset as builtin function and optimize it away, so just delete it. It was a leftover from testing of bpf_perf_event_output() with large data structures. Fixes: 39111695b1b8 ("samples: bpf: add bpf_perf_event_output example") Signed-off-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'samples')
-rw-r--r--samples/bpf/trace_output_kern.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/samples/bpf/trace_output_kern.c b/samples/bpf/trace_output_kern.c
index 8d8d1ec429eb..9b96f4fb8cea 100644
--- a/samples/bpf/trace_output_kern.c
+++ b/samples/bpf/trace_output_kern.c
@@ -18,7 +18,6 @@ int bpf_prog1(struct pt_regs *ctx)
u64 cookie;
} data;
- memset(&data, 0, sizeof(data));
data.pid = bpf_get_current_pid_tgid();
data.cookie = 0x12345678;