git: dd5cba624e7f - stable/13 - get_nhop: eliminate write only variable gateway

From: Warner Losh <imp_at_FreeBSD.org>
Date: Sun, 02 Oct 2022 04:30:07 UTC
The branch stable/13 has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=dd5cba624e7f8e5b5490ea63ea62ed0e3ca92721

commit dd5cba624e7f8e5b5490ea63ea62ed0e3ca92721
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

    get_nhop: eliminate write only variable gateway
    
    Sponsored by:           Netflix
    
    (cherry picked from commit 7f9c3339a4ff5fecab3f408ba86afd3c5b778bd3)
---
 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 56d30405fc1e..5dfc275cd1e7 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) {