From nobody Thu Oct 06 14:01:37 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 4MjtQp0sFDz4dgHL; Thu, 6 Oct 2022 14:01:38 +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 4MjtQp0Pknz3HhQ; Thu, 6 Oct 2022 14:01:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665064898; 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=blsHPo2eqwjO+Zp1J4BWexSHlNpH/s6On+k4ShqXL1w=; b=MFXO0v3XlcHXVwHMAmN+eDCdVibhNCn66IeCTpZU/tSbon1BesqWxSiOEA1IuvoTddshad 4eQBKCsZUlLgwtT+H63VOp7is850T55Jnbkqh6XA+0jnABl/ZDynfKDs9lCN7RiFNeZr6Q 5xE5zn8/ySA8PTOMkz/GxDLYuDpMGO0AVdbmE53vAJ2HG6RncJ5SbY//efnkusSlfxb5Yo VRHDI2rXjzqyvQRFH05htwtV6MbTOqzaf7QCILViTRL7L6rLKWtd5T1/KQuq5ZfMNnRn86 5y1phZhDZNkM5wav3n3psIgN2+Jtco96vRa3LcI0rFwAsn331G8jn3/mAdXyCw== 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 4MjtQn6ZhPzGm4; Thu, 6 Oct 2022 14:01:37 +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 296E1bjB055149; Thu, 6 Oct 2022 14:01:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 296E1bkN055148; Thu, 6 Oct 2022 14:01:37 GMT (envelope-from git) Date: Thu, 6 Oct 2022 14:01:37 GMT Message-Id: <202210061401.296E1bkN055148@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 6bc76d390b89 - stable/12 - ipfilter/libipf: printpool_live() consumer ignores return code 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: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 6bc76d390b89248bc7fdd974761526ae315e5282 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665064898; 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=blsHPo2eqwjO+Zp1J4BWexSHlNpH/s6On+k4ShqXL1w=; b=KIJAjRaYVjhk1tzYhqiNPHhyQzX1fDqd7w5BEgdYefOkq1srBuFAyfXL52urn4JBwaggtP OEja8lr1nAaMOvNhfuxyfVm8+ISsgcDkdaZFc8AG0GHWeNpvUh8NlJrh4S4h1HGauAeRue N494Kw4Og+qtCpUlwBLq6p12BDg15wLgOGY4BCbUqhGY4l8ucgo4L3uo4UHJ79Yvb7q++n xCB+eBveeGr6ysNAKt/glGZ08k6i2v3GNYeISJsSn0YMCroYd5ZwWE7oTWGMBEwFSQq6fO 6jLcY+FdPdQdIuSY1m1zxfn8uErCK4RJywbT9lBJQgAw02DZMR3xu4jvsFXY1w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1665064898; a=rsa-sha256; cv=none; b=b9/ID9v85QDZjbm7FLVqflIYJOkHz1kUw2+G8Z6iystK7nQG9mhSH3Zd4IvnY+xu14wXAR 6GQ5O0h8w6pqJK7GGXTDhsFIgNnO3+RmeUmuOpcLjxHhCjrFvFBrJGkaM2kv+bpxWoYABA Hz3ZhlPTWJwzVrXS/7cJ0USmReeV16N65B7djGXzPnDFtuB74P+SLI1yA81rlUtN3jR9NP 5nlF5C3c3YgEpzF/29n3jPVMuBYyXO0rhiWpCki9LXh4BjiWONR7AlQ8+YNGb1TftugG4a Mzx8hV0+ftcI9Y3YU/IxxHv+SVvbSKJpr4dU044Km9K7AWSesTViuzS+NB3Yhw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=6bc76d390b89248bc7fdd974761526ae315e5282 commit 6bc76d390b89248bc7fdd974761526ae315e5282 Author: Cy Schubert AuthorDate: 2022-09-22 18:26:23 +0000 Commit: Cy Schubert CommitDate: 2022-10-06 14:00:27 +0000 ipfilter/libipf: printpool_live() consumer ignores return code The single consumer of printpool_live() ignores the return code. Avoid wasting resources on this. (cherry picked from commit 00d8a28f19b21ce2955c0cf24a040824ec506da5) --- sbin/ipf/common/ipf.h | 2 +- sbin/ipf/libipf/printpool_live.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sbin/ipf/common/ipf.h b/sbin/ipf/common/ipf.h index b278d8ec5d6c..977b3f0fd105 100644 --- a/sbin/ipf/common/ipf.h +++ b/sbin/ipf/common/ipf.h @@ -318,7 +318,7 @@ extern ipf_dstnode_t *printdstlistnode(ipf_dstnode_t *, copyfunc_t, extern void printdstlistpolicy(ippool_policy_t); extern struct ip_pool_s *printpool(struct ip_pool_s *, copyfunc_t, char *, int, wordtab_t *); -extern struct ip_pool_s *printpool_live(struct ip_pool_s *, int, +extern void printpool_live(struct ip_pool_s *, int, char *, int, wordtab_t *); extern void printpooldata(ip_pool_t *, int); extern void printpoolfield(void *, int, int); diff --git a/sbin/ipf/libipf/printpool_live.c b/sbin/ipf/libipf/printpool_live.c index c1d770b4ef77..9bb19f2888b4 100644 --- a/sbin/ipf/libipf/printpool_live.c +++ b/sbin/ipf/libipf/printpool_live.c @@ -9,7 +9,7 @@ #include "netinet/ipl.h" -ip_pool_t * +void printpool_live(ip_pool_t *pool, int fd, char *name, int opts, wordtab_t *fields) { @@ -19,7 +19,7 @@ printpool_live(ip_pool_t *pool, int fd, char *name, int opts, ipfobj_t obj; if ((name != NULL) && strncmp(name, pool->ipo_name, FR_GROUPLEN)) - return (pool->ipo_next); + return; if (fields == NULL) printpooldata(pool, opts); @@ -71,5 +71,5 @@ printpool_live(ip_pool_t *pool, int fd, char *name, int opts, (void) ioctl(fd,SIOCIPFDELTOK, &iter.ili_key); - return (pool->ipo_next); + return; }