From 7f9c3339a4ff5fecab3f408ba86afd3c5b778bd3 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Mon, 4 Apr 2022 20:37:22 -0600 Subject: [PATCH] get_nhop: eliminate write only variable gateway Sponsored by: Netflix --- sys/net/route/nhop_ctl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/net/route/nhop_ctl.c b/sys/net/route/nhop_ctl.c index b9b6a6b59139..6a82391307f1 100644 --- a/sys/net/route/nhop_ctl.c +++ b/sys/net/route/nhop_ctl.c @@ -354,7 +354,7 @@ static int get_nhop(struct rib_head *rnh, struct rt_addrinfo *info, struct nhop_priv **pnh_priv) { - const struct sockaddr *dst, *gateway, *netmask; + const struct sockaddr *dst, *netmask; struct nhop_priv *nh_priv, *tmp_priv; int error; @@ -363,7 +363,6 @@ get_nhop(struct rib_head *rnh, struct rt_addrinfo *info, /* Give the protocols chance to augment the request data */ dst = info->rti_info[RTAX_DST]; netmask = info->rti_info[RTAX_NETMASK]; - gateway = info->rti_info[RTAX_GATEWAY]; error = rnh->rnh_preadd(rnh->rib_fibnum, dst, netmask, nh_priv->nh); if (error != 0) {