From nobody Tue Apr 05 04:33:00 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id F028F1A92EC4; Tue, 5 Apr 2022 04:33:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KXZWc2NxRz4gf2; Tue, 5 Apr 2022 04:33:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649133180; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O+uO3pzT1TkUFAs90k/V4+HDm9gpVe0oF5xxYuSJ+Gg=; b=nTIFJUxEP1Yfqv8S5DO83CAAshLMJ6xscpOGBOzJrRYRJIjsJhattqwKviLVeR9MuHWxkA ns+shXSIP7vy3bGoO8xITP+raqhlxVmngPfMuj6Rlz0qv9Gp6jAYQ84McsJ3Dztx84/pUL jTHk2PDXGuf0WBdBSDgrVssMNf1zCfYPrl9jP9f7LHwC+DJlTDB/olyV++94mCbzfHWFg1 /GqoYdF0kCJ3EeQUx31ELINr91VZKNtEfKC01wJM/JIVxiHpBh5WeeozdSbbLnPEOTGW8k cPdX5oYuUeI1IWbTuZpqaZ6u5jv3+FYxpVi1qsD3L3ox7pldysObuOQ3dayQUA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2D9BF1FEE2; Tue, 5 Apr 2022 04:33:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2354X0EA009753; Tue, 5 Apr 2022 04:33:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2354X0bI009752; Tue, 5 Apr 2022 04:33:00 GMT (envelope-from git) Date: Tue, 5 Apr 2022 04:33:00 GMT Message-Id: <202204050433.2354X0bI009752@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 5de5b5a34db9 - main - route_ctl: eliminate write only variables ifa and nh List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5de5b5a34db93a2a646e88d39a8e7718f925636f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649133180; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O+uO3pzT1TkUFAs90k/V4+HDm9gpVe0oF5xxYuSJ+Gg=; b=NI7IF4GIIdXvr2Wwlp7bSLHqXVO4FJXs8u2GkimLI9NywpUMrXkIfdXzQeIT8v4cBrctpw 2l02MKcMhf8GQdUTyjB5LnsAFW6jsAej48pf58tQoWEPQw4lFQCSG7KI7PG6ywETBauxiH 6kT21tq6mPqYcNAZ3FB1brMBe10Z0kgiFSSM+cjR51XIbPl2Rj2Et9urwYqt8WMwOCwM3l WrShWYbEnXKdr1nDaptZFey4JHdWGNVNz/a270oc5D3WgAiBUgpvCPLBhqcKpbBJJvcSoe GdDXd310iZ6TVGCPVNKorQRYnmW2CjhNiunDLQMThX/U3JfWeX4C54n6aHpQlg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649133180; a=rsa-sha256; cv=none; b=P24C4bMr2XPFVz9muZupz/SQbuMYnmBidMbLG1JxF1Dk0JQfP70VSYvLhJs0xDCZWC6AjL prhLQvVITgmlYM3jb05zmOgR6f0qEV/BiJQLfCZwVqef66lXaaCfX3ykn+KTXhxypWq93d nM2VFgnz8TyPRAOaFA5g/svF1TFrCRd2GKnj/KPi3fleHJijJdCKQ10Zmr4f/YkYRP8Xmr eFD15qfOMQcDSi3W18nLa2/MFK80zK/mwGX5BfeXqhwL6BVzeudoV2YXHo9QFAeb6gxZUN C/x6mrPVo6vjXXje7znisz9yQSavii6RcXYCW/iSjs66EVRK61H3vAwucrfLeA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=5de5b5a34db93a2a646e88d39a8e7718f925636f commit 5de5b5a34db93a2a646e88d39a8e7718f925636f Author: Warner Losh AuthorDate: 2022-04-05 02:37:59 +0000 Commit: Warner Losh CommitDate: 2022-04-05 04:30:48 +0000 route_ctl: eliminate write only variables ifa and nh Sponsored by: Netflix --- 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 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);