Skip to content

Commit 2e1d175

Browse files
author
Florian Westphal
committed
netfilter: nfnetlink_log: silence bogus compiler warning
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>
1 parent ebd032f commit 2e1d175

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/netfilter/nfnetlink_log.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -698,8 +698,8 @@ nfulnl_log_packet(struct net *net,
698698
unsigned int plen = 0;
699699
struct nfnl_log_net *log = nfnl_log_pernet(net);
700700
const struct nfnl_ct_hook *nfnl_ct = NULL;
701+
enum ip_conntrack_info ctinfo = 0;
701702
struct nf_conn *ct = NULL;
702-
enum ip_conntrack_info ctinfo;
703703

704704
if (li_user && li_user->type == NF_LOG_TYPE_ULOG)
705705
li = li_user;

0 commit comments

Comments
 (0)