mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-06 17:35:20 +02:00
net: tipc: avoid possible garbage value
[ Upstream commit99655a304e
] Clang static checker (scan-build) warning: net/tipc/bcast.c:305:4: The expression is an uninitialized value. The computed value will also be garbage [core.uninitialized.Assign] 305 | (*cong_link_cnt)++; | ^~~~~~~~~~~~~~~~~~ tipc_rcast_xmit() will increase cong_link_cnt's value, but cong_link_cnt is uninitialized. Although it won't really cause a problem, it's better to fix it. Fixes:dca4a17d24
("tipc: fix potential hanging after b/rcast changing") Signed-off-by: Su Hui <suhui@nfschina.com> Reviewed-by: Justin Stitt <justinstitt@google.com> Link: https://patch.msgid.link/20240912110119.2025503-1-suhui@nfschina.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
a46add42bd
commit
2b5e904dea
|
@ -320,8 +320,8 @@ static int tipc_mcast_send_sync(struct net *net, struct sk_buff *skb,
|
|||
{
|
||||
struct tipc_msg *hdr, *_hdr;
|
||||
struct sk_buff_head tmpq;
|
||||
u16 cong_link_cnt = 0;
|
||||
struct sk_buff *_skb;
|
||||
u16 cong_link_cnt;
|
||||
int rc = 0;
|
||||
|
||||
/* Is a cluster supporting with new capabilities ? */
|
||||
|
|
Loading…
Reference in New Issue
Block a user