]> git.baikalelectronics.ru Git - kernel.git/commit
net/core/filter: fix unused-variable warning
authorAnders Roxell <anders.roxell@linaro.org>
Fri, 7 Sep 2018 12:50:05 +0000 (14:50 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 11 Sep 2018 21:54:52 +0000 (14:54 -0700)
commite01f7a1b28ec4698a0620db7a6f844425f2ab24d
tree3f33396f58fc85d214b210d4700b5a125c002ac7
parent42d63d15f097e03ffd265aae5a19f4ff5057c356
net/core/filter: fix unused-variable warning

Building with CONFIG_INET=n will show the warning below:
net/core/filter.c: In function ‘____bpf_getsockopt’:
net/core/filter.c:4048:19: warning: unused variable ‘tp’ [-Wunused-variable]
  struct tcp_sock *tp;
                   ^~
net/core/filter.c:4046:31: warning: unused variable ‘icsk’ [-Wunused-variable]
  struct inet_connection_sock *icsk;
                               ^~~~
Move the variable declarations inside the {} block where they are used.

Fixes: d9d80f32e7f7 ("bpf: add TCP_SAVE_SYN/TCP_SAVED_SYN options for bpf_(set|get)sockopt")
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
net/core/filter.c