lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <tencent_155F5603C098FE823F48F8918122C3783107@qq.com>
Date: Mon, 26 Aug 2024 15:35:51 +0800
From: jiping huang <huangjiping95@...com>
To: davem@...emloft.net,
	dsahern@...nel.org,
	edumazet@...gle.com,
	kuba@...nel.org,
	pabeni@...hat.com
Cc: netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	jiping huang <huangjiping95@...com>
Subject: [PATCH] net: Remove a local variable with the same name as the parameter.

There is no need to use an additional local avariable to get rtmsg.flags,
and this variable has the same name as the function argument.

Signed-off-by: jiping huang <huangjiping95@...com>

diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c
index f669da98d11d..0d69267c9971 100644
--- a/net/ipv4/fib_semantics.c
+++ b/net/ipv4/fib_semantics.c
@@ -1830,12 +1830,10 @@ int fib_dump_info(struct sk_buff *skb, u32 portid, u32 seq, int event,
 
 	if (nhs == 1) {
 		const struct fib_nh_common *nhc = fib_info_nhc(fi, 0);
-		unsigned char flags = 0;
 
-		if (fib_nexthop_info(skb, nhc, AF_INET, &flags, false) < 0)
+		if (fib_nexthop_info(skb, nhc, AF_INET, &rtm->rtm_flags, false) < 0)
 			goto nla_put_failure;
 
-		rtm->rtm_flags = flags;
 #ifdef CONFIG_IP_ROUTE_CLASSID
 		if (nhc->nhc_family == AF_INET) {
 			struct fib_nh *nh;
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ