summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/test_sockmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/testing/selftests/bpf/test_sockmap.c')
-rw-r--r--tools/testing/selftests/bpf/test_sockmap.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/testing/selftests/bpf/test_sockmap.c b/tools/testing/selftests/bpf/test_sockmap.c
index 892a690c4e7b..6d724fea59fb 100644
--- a/tools/testing/selftests/bpf/test_sockmap.c
+++ b/tools/testing/selftests/bpf/test_sockmap.c
@@ -1030,7 +1030,7 @@ run:
tx_prog_fd = -1;
if (tx_prog_fd > 0) {
- int redir_fd, i = 0;
+ int redir_fd;
err = bpf_prog_attach(tx_prog_fd,
map_fd[1], BPF_SK_MSG_VERDICT, 0);
@@ -1041,6 +1041,7 @@ run:
goto out;
}
+ i = 0;
err = bpf_map_update_elem(map_fd[1], &i, &c1, BPF_ANY);
if (err) {
fprintf(stderr,