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: <20220917063031.2172-1-williamsukatube@163.com>
Date:   Sat, 17 Sep 2022 14:30:31 +0800
From:   williamsukatube@....com
To:     dsahern@...nel.org, davem@...emloft.net, yoshfuji@...ux-ipv6.org,
        edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:     William Dean <williamsukatube@....com>
Subject: [PATCH -next] nexthop: simplify code in nh_valid_get_bucket_req

From: William Dean <williamsukatube@....com>

It could directly return 'nh_valid_get_bucket_req_res_bucket' to simplify code.

Signed-off-by: William Dean <williamsukatube@....com>
---
 net/ipv4/nexthop.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/net/ipv4/nexthop.c b/net/ipv4/nexthop.c
index 853a75a8fbaf..1556961cf153 100644
--- a/net/ipv4/nexthop.c
+++ b/net/ipv4/nexthop.c
@@ -3489,12 +3489,8 @@ static int nh_valid_get_bucket_req(const struct nlmsghdr *nlh,
 		return -EINVAL;
 	}

-	err = nh_valid_get_bucket_req_res_bucket(tb[NHA_RES_BUCKET],
+	return nh_valid_get_bucket_req_res_bucket(tb[NHA_RES_BUCKET],
 						 bucket_index, extack);
-	if (err)
-		return err;
-
-	return 0;
 }

 /* rtnl */
--
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ