git: 8a35f2f0b722 - stable/13 - route_ctl: eliminate write only variables ifa and nh
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 02 Oct 2022 04:30:08 UTC
The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=8a35f2f0b72213b112973fb2a66eba5c249ed6aa commit 8a35f2f0b72213b112973fb2a66eba5c249ed6aa Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2022-07-08 17:53:34 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2022-10-02 04:25:56 +0000 route_ctl: eliminate write only variables ifa and nh Sponsored by: Netflix (cherry picked from commit 5de5b5a34db93a2a646e88d39a8e7718f925636f) --- sys/net/route/route_ctl.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sys/net/route/route_ctl.c b/sys/net/route/route_ctl.c index 292233541406..890a25b5f546 100644 --- a/sys/net/route/route_ctl.c +++ b/sys/net/route/route_ctl.c @@ -630,7 +630,6 @@ create_rtentry(struct rib_head *rnh, struct rt_addrinfo *info, struct sockaddr *dst, *ndst, *gateway, *netmask; struct rtentry *rt; struct nhop_object *nh; - struct ifaddr *ifa; int error, flags; dst = info->rti_info[RTAX_DST]; @@ -686,7 +685,6 @@ create_rtentry(struct rib_head *rnh, struct rt_addrinfo *info, * This moved from below so that rnh->rnh_addaddr() can * examine the ifa and ifa->ifa_ifp if it so desires. */ - ifa = info->rti_ifa; rt->rt_weight = get_info_weight(info, RT_DEFAULT_WEIGHT); rt_set_expire_info(rt, info); @@ -1061,10 +1059,9 @@ change_route(struct rib_head *rnh, struct rt_addrinfo *info, struct route_nhop_data *rnd_orig, struct rib_cmd_info *rc) { int error = 0; - struct nhop_object *nh, *nh_orig; + struct nhop_object *nh_orig; struct route_nhop_data rnd_new; - nh = NULL; nh_orig = rnd_orig->rnd_nhop; if (nh_orig == NULL) return (ESRCH);