Skip to content

Commit

Permalink
netfilter: nfnetlink_log: silence bogus compiler warning
Browse files Browse the repository at this point in the history
net/netfilter/nfnetlink_log.c:800:18: warning: variable 'ctinfo' is uninitialized

The warning is bogus, the variable is only used if ct is non-NULL and
always initialised in that case.  Init to 0 too to silence this.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202309100514.ndBFebXN-lkp@intel.com/
Signed-off-by: Florian Westphal <fw@strlen.de>
  • Loading branch information
Florian Westphal committed Oct 12, 2023
1 parent ebd032f commit 2e1d175
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/netfilter/nfnetlink_log.c
Original file line number Diff line number Diff line change
Expand Up @@ -698,8 +698,8 @@ nfulnl_log_packet(struct net *net,
unsigned int plen = 0;
struct nfnl_log_net *log = nfnl_log_pernet(net);
const struct nfnl_ct_hook *nfnl_ct = NULL;
enum ip_conntrack_info ctinfo = 0;
struct nf_conn *ct = NULL;
enum ip_conntrack_info ctinfo;

if (li_user && li_user->type == NF_LOG_TYPE_ULOG)
li = li_user;
Expand Down

0 comments on commit 2e1d175

Please sign in to comment.