]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: silence uninitialized var warning in bpf_skb_net_grow
authorWillem de Bruijn <willemb@google.com>
Sat, 23 Mar 2019 16:23:07 +0000 (12:23 -0400)
committerAlexei Starovoitov <ast@kernel.org>
Sun, 24 Mar 2019 22:31:57 +0000 (15:31 -0700)
commit91cb2d765fc0d00fd2320e6386563aec1c85731f
tree1db3163ba2f023f753054bd45f4976aae57eba8c
parent38a74b33525f084ebe3a9e89c13fb89eaf05361e
bpf: silence uninitialized var warning in bpf_skb_net_grow

These three variables are set in one branch and used in another with
the same condition. But on some architectures they still generate
compiler warnings of the kind:

  warning: 'inner_trans' may be used uninitialized in this function [-Wmaybe-uninitialized]

Silence these false positives. Use the straightforward approach to
always initialize them, if a bit superfluous.

Fixes: e8ff86a1e004 ("bpf: add bpf_skb_adjust_room encap flags")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
net/core/filter.c