From nobody Wed Apr 06 23:46:06 2022 X-Original-To: dev-commits-src-main@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 8E73C1A82FEB; Wed, 6 Apr 2022 23:46:07 +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 4KYh3f4tdMz4QqP; Wed, 6 Apr 2022 23:46:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649288767; 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=kHX9QmiZBepqGe6CxdlwLh2MnhYZr68bm/YdlpZWOeI=; b=naVkbp4kWGwdLx4H/3qZPws4mj5/SgRpphcPA6OWl1PkPSGx6bhNULTGiOk/JjwG+vZD3j DffmUtaGA6sOoxVchl2g4NCYCudrncSKFkNYzro/QjYcKUuhoEauXE6XTxHGyxmyz1FIqK OJ0RQ4WzAqau/jjWFSGm1zfs+d/Ftx8JrBYBKtrlcBZSYQos8C0Q/3w2ymyCkpp3m2nR6v RcItBwRAl5P25BNtq2dMRA3rmzyrpXLpMNmcH67Rbi/PSlJqYKSLmBkppnvYgSO3kmxvWg ITuNRuU1Np+BWE9XSI4jATH0nbZRr2FWXoiDiJCunpsA2Uy1oemjEzSU3hJ5VQ== 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 649AD24E14; Wed, 6 Apr 2022 23:46:06 +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 236Nk6tH008793; Wed, 6 Apr 2022 23:46:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 236Nk6XA008792; Wed, 6 Apr 2022 23:46:06 GMT (envelope-from git) Date: Wed, 6 Apr 2022 23:46:06 GMT Message-Id: <202204062346.236Nk6XA008792@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: f7236dd0684e - main - change_mpath_route: Remove write-only nh variable. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f7236dd0684e0a523f2b19b187b5ae3b558de4f2 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649288767; 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=kHX9QmiZBepqGe6CxdlwLh2MnhYZr68bm/YdlpZWOeI=; b=M9ee+XpsL4HOeXaHip/l7/IOhqhRD1f4NPDIeVt6bSZfRKssoYfxNdoKCleyBSRooiMior DovVWHwC8PGkgFpP8pDICMYxSe28zhpB9X3FK9iI9D1Y2MPag+9PGBaYH6+IJROKnohI3R p+TEuCLbM41aUdp1YqMP2uqsLc1BABATsJMZk+HodTQgYE9U+V0O/33X7er/GnZ/sG00ri jvKfmtXmVedsgBRUZbBDmEphsCEVVpg8P1YxRBjCIef54gwiTtsU/zLewT3RSGk7yeSna5 A4O7IKY+PTos6rTa4kenjPUcdvaDGZnN2zhEiuGByZclOo2vyFtNBSmaUfMSaw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649288767; a=rsa-sha256; cv=none; b=JgsEdhRBCeomN5kHnZhzwHS8Smu1omx5QKAw8/ENQKOsmmRd33V6pPNJcBNghFyovIQ1fG ev+zDVIXydlPuwBlWQdj8HUkY6GVUnIJ1IaSKAtHOx7/XsTMrzskI9iEt4NMJRuxuAsXii skF1w/m1ajud7H6w6twkDOSG8hIqWkKvf+4doj8JsEO7eO1YonOqsL39P1uMk+WvYj8nJX p+RA+F/UA6sAPo7l2YJkG3CcLnkYWG40xxnO7YUYOKmKSa3C7vbsF3uNEg6xXIyY3svUkj 4/a5goWuoKyR23YsaE9yY1HjqyBVuLriGP2OG3pOHQ7peCD/7tNTvsRYveWa3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=f7236dd0684e0a523f2b19b187b5ae3b558de4f2 commit f7236dd0684e0a523f2b19b187b5ae3b558de4f2 Author: John Baldwin AuthorDate: 2022-04-06 23:45:28 +0000 Commit: John Baldwin CommitDate: 2022-04-06 23:45:28 +0000 change_mpath_route: Remove write-only nh variable. While here, cleanup the style of the function prologue by moving an assignment out of the middle of two variable declaration blocks. --- sys/net/route/route_ctl.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sys/net/route/route_ctl.c b/sys/net/route/route_ctl.c index 5a4ff943ac2f..3b480c6fd6ea 100644 --- a/sys/net/route/route_ctl.c +++ b/sys/net/route/route_ctl.c @@ -1000,15 +1000,12 @@ change_mpath_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, *nh_new; + struct nhop_object *nh_orig, *nh_new; struct route_nhop_data rnd_new; - - nh = NULL; - nh_orig = rnd_orig->rnd_nhop; - struct weightened_nhop *wn = NULL, *wn_new; uint32_t num_nhops; + nh_orig = rnd_orig->rnd_nhop; wn = nhgrp_get_nhops((struct nhgrp_object *)nh_orig, &num_nhops); nh_orig = NULL; for (int i = 0; i < num_nhops; i++) {