aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/trace_helpers.c
diff options
context:
space:
mode:
authorChang-Hsien Tsai <luke.tw@gmail.com>2019-05-26 10:32:11 +0000
committerDaniel Borkmann <daniel@iogearbox.net>2019-05-28 10:54:01 +0200
commit92bd6820f2b11c2decdd92e1f9020e804dbc2ed1 (patch)
tree5dfc445288bf7446cc88dec4319d27e243a0e237 /tools/testing/selftests/bpf/trace_helpers.c
parentbpf: check signal validity in nmi for bpf_send_signal() helper (diff)
downloadlinux-dev-92bd6820f2b11c2decdd92e1f9020e804dbc2ed1.tar.xz
linux-dev-92bd6820f2b11c2decdd92e1f9020e804dbc2ed1.zip
bpf: style fix in while(!feof()) loop
Use fgets() as the while loop condition. Signed-off-by: Chang-Hsien Tsai <luke.tw@gmail.com> Acked-by: Yonghong Song <yhs@fb.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to '')
-rw-r--r--tools/testing/selftests/bpf/trace_helpers.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/tools/testing/selftests/bpf/trace_helpers.c b/tools/testing/selftests/bpf/trace_helpers.c
index 9a9fc6c9b70b..b47f205f0310 100644
--- a/tools/testing/selftests/bpf/trace_helpers.c
+++ b/tools/testing/selftests/bpf/trace_helpers.c
@@ -30,9 +30,7 @@ int load_kallsyms(void)
if (!f)
return -ENOENT;
- while (!feof(f)) {
- if (!fgets(buf, sizeof(buf), f))
- break;
+ while (fgets(buf, sizeof(buf), f)) {
if (sscanf(buf, "%p %c %s", &addr, &symbol, func) != 3)
break;
if (!addr)