Skip to content

Commit fe4625d

Browse files
ebirgerborkmann
authored andcommitted
selftests/bpf: Remove unused variable from bpf_sk_assign test
Was never used in bpf_sk_assign_test(), and was removed from handle_{tcp,udp}() in commit 0b9ad56 ("selftests/bpf: Use SOCKMAP for server sockets in bpf_sk_assign test"). Fixes: 0b9ad56 ("selftests/bpf: Use SOCKMAP for server sockets in bpf_sk_assign test") Signed-off-by: Eyal Birger <eyal.birger@gmail.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/20220329154914.3718658-1-eyal.birger@gmail.com
1 parent 11e17ae commit fe4625d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

tools/testing/selftests/bpf/progs/test_sk_assign.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ get_tuple(struct __sk_buff *skb, bool *ipv4, bool *tcp)
8989
static inline int
9090
handle_udp(struct __sk_buff *skb, struct bpf_sock_tuple *tuple, bool ipv4)
9191
{
92-
struct bpf_sock_tuple ln = {0};
9392
struct bpf_sock *sk;
9493
const int zero = 0;
9594
size_t tuple_len;
@@ -121,7 +120,6 @@ handle_udp(struct __sk_buff *skb, struct bpf_sock_tuple *tuple, bool ipv4)
121120
static inline int
122121
handle_tcp(struct __sk_buff *skb, struct bpf_sock_tuple *tuple, bool ipv4)
123122
{
124-
struct bpf_sock_tuple ln = {0};
125123
struct bpf_sock *sk;
126124
const int zero = 0;
127125
size_t tuple_len;
@@ -161,7 +159,7 @@ handle_tcp(struct __sk_buff *skb, struct bpf_sock_tuple *tuple, bool ipv4)
161159
SEC("tc")
162160
int bpf_sk_assign_test(struct __sk_buff *skb)
163161
{
164-
struct bpf_sock_tuple *tuple, ln = {0};
162+
struct bpf_sock_tuple *tuple;
165163
bool ipv4 = false;
166164
bool tcp = false;
167165
int tuple_len;

0 commit comments

Comments
 (0)