From nobody Tue Apr 5 04:33:01 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 DFA011A92FB0; Tue, 5 Apr 2022 04:33:02 +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 4KXZWd4SVGz4gbw; Tue, 5 Apr 2022 04:33:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649133182; 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=yVvUpzYKDJHehaUCX5bAD20WRA+z2zfvkfVQKpY+0eg=; b=PinWIXnxqSBX+5CqzaDy1UEFElP+WtjjJTeKbScx2ic0SIKuHuy81/zIYyhoiTJKEclJmm iiZuLAt3lnvVDY9bB82EynRpYMn/qu6QSRXDc6U4ex/vai+lOdJse0IurulZRWw1RQ0Hrn qBbe93+E+rrxH6+SXL8bREbeMqh3puzyiMDsDi+bLJfNRsXyZ9AeBaN8GByFQQRuss+4AO ur4P4t8yqU1qb+eRTASzwy7gYOqRHbv8XfpY0fY3Ub6RhDuBVkNIqkwwAzvW8aFa1q4F68 2pAmiInfGTcW4DbqG5G+zW4TDlw3yGgNlIDvcGEOcRRAz1ncRHFhTEZG6ETu8w== 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 477071F862; Tue, 5 Apr 2022 04:33:01 +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 2354X1PC009782; Tue, 5 Apr 2022 04:33:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2354X1Fl009781; Tue, 5 Apr 2022 04:33:01 GMT (envelope-from git) Date: Tue, 5 Apr 2022 04:33:01 GMT Message-Id: <202204050433.2354X1Fl009781@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: e606e5d15726 - main - sysctl_dumpentry: move error to inner scope 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e606e5d1572684b978ca0572da776a597ffe0d94 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649133182; 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=yVvUpzYKDJHehaUCX5bAD20WRA+z2zfvkfVQKpY+0eg=; b=NhNfUVJ0kD7uLo0Ynd0fMwS6ReCamBctv8+9GhlS1E3/VmFYyTtI4diDKO7FWSyyWdHNk4 3OpueX5LeEaXt1qANms+p+OQtX1BAAIb5asxKXDwIz90n4qJSYNlxFU5HgqqKnXZJbEapf Lpt9dQMa78X+x54lWJWc7sUvy7lIpzfpBhtdmfvAWxbRaWTRyq8LloubiH8+SJOfR0lt5H TWmJ+mtpr2+Umy3fg6rRHW6uzZB2AEx4+Pw+RtyygWsWMS/q2D6Ta597iCEwvcxp5ZdOeg w4/4wR2FYhUxnON8NXynihwO8LuggvIavByX4YhRmiVbu13VuseVMwwrcE4fYw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649133182; a=rsa-sha256; cv=none; b=KajZLSCIIVf6N+BeJy7Qi0mwOQBEOtsuPXjCOjX+4ZEiluojmaDlvBbxfE/kX++AnunWKU 9Fy4ls/cuhPYItdgavWAg5mYsRGLNthX+chuMcdklkcF9DMUS9VD0nnJkqGDEO2e9oYXaZ dwF//Iwiusdg/TLwBtmJvRUjTxIJW81NO620u8uCtnklO4nCVFRXpdCOnRXs7ac3LLu1eA bN24lAL9D45kuedAuEZ5vTvzcdmM63M4NGuhYzvbtDE1se0fL00BImMEAREdp0pMTUc4rk nUzl5ZVCsvWNarhTghfPfUWGaBzAwZeNZzz5r6Ptl+oUhn1S7+26dP2sifAxPQ== 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=e606e5d1572684b978ca0572da776a597ffe0d94 commit e606e5d1572684b978ca0572da776a597ffe0d94 Author: Warner Losh AuthorDate: 2022-04-05 02:38:56 +0000 Commit: Warner Losh CommitDate: 2022-04-05 04:30:50 +0000 sysctl_dumpentry: move error to inner scope Sponsored by: Netflix --- sys/net/rtsock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index c5f842de2b7e..bc35255315b2 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -2203,7 +2203,6 @@ sysctl_dumpentry(struct rtentry *rt, void *vw) { struct walkarg *w = vw; struct nhop_object *nh; - int error = 0; NET_EPOCH_ASSERT(); @@ -2215,6 +2214,7 @@ sysctl_dumpentry(struct rtentry *rt, void *vw) if (NH_IS_NHGRP(nh)) { struct weightened_nhop *wn; uint32_t num_nhops; + int error; wn = nhgrp_get_nhops((struct nhgrp_object *)nh, &num_nhops); for (int i = 0; i < num_nhops; i++) { error = sysctl_dumpnhop(rt, wn[i].nh, wn[i].weight, w); @@ -2223,7 +2223,7 @@ sysctl_dumpentry(struct rtentry *rt, void *vw) } } else #endif - error = sysctl_dumpnhop(rt, nh, rt->rt_weight, w); + sysctl_dumpnhop(rt, nh, rt->rt_weight, w); return (0); }