aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2022-04-05 02:37:59 +0000
committerWarner Losh <imp@FreeBSD.org>2022-04-05 04:30:48 +0000
commit5de5b5a34db93a2a646e88d39a8e7718f925636f (patch)
tree259b9a27ad8084d6bce81ba401405de8bc3e4716
parent7f9c3339a4ff5fecab3f408ba86afd3c5b778bd3 (diff)
downloadsrc-5de5b5a34db93a2a646e88d39a8e7718f925636f.tar.gz
src-5de5b5a34db93a2a646e88d39a8e7718f925636f.zip
route_ctl: eliminate write only variables ifa and nh
Sponsored by: Netflix
-rw-r--r--sys/net/route/route_ctl.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/sys/net/route/route_ctl.c b/sys/net/route/route_ctl.c
index 123939fd31c9..5a4ff943ac2f 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);