From nobody Thu Sep 22 22:39:27 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 4MYVZm1RbLz4cV2t; Thu, 22 Sep 2022 22:39:28 +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 4MYVZm0mDNz3yqV; Thu, 22 Sep 2022 22:39:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1663886368; 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=MwdVhyP9Clok8Bqz4A4gtRSjLq+YR5foGjkpdrdvfXQ=; b=AKHtIacohbsrKyaroS9qRY9jY2SrY0wyPbm22Kq8thZygNTXbXot6AzGW34KCPQ50egsPL 2dzilDIXq24LgFwDHzWvelEUdKFlkF40SpDGk8M6fZgcPUhbwtBpL9oZ4bp3Pat/CZwrtq eKFAaMNGZtLiU4TzB+lfCX1lZOkTtS8UZP1Y4iQQP1+wTVfPt4s+RRKgs4UDWfg1quuWsf 6XsoZQ8IDynont/his6t7MMM+8ejNQsuE6UDfS7JEez3sE7URLg/6U2PwYK5UdARKt66Nx vyD2sUePPQ2SP2xudbEaOimLN3s5FugVBeukx1FfrmCCC6ghhf9+eyfhH1MFuQ== 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 4MYVZl6vrPzY8x; Thu, 22 Sep 2022 22:39:27 +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 28MMdRgi021758; Thu, 22 Sep 2022 22:39:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 28MMdR5u021757; Thu, 22 Sep 2022 22:39:27 GMT (envelope-from git) Date: Thu, 22 Sep 2022 22:39:27 GMT Message-Id: <202209222239.28MMdR5u021757@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: 00d8a28f19b2 - main - 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/main X-Git-Reftype: branch X-Git-Commit: 00d8a28f19b21ce2955c0cf24a040824ec506da5 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1663886368; 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=MwdVhyP9Clok8Bqz4A4gtRSjLq+YR5foGjkpdrdvfXQ=; b=jVvleoyPf2WPL7OpgqWHOE9hrNQ8OA56Ha4kL6vhgXPoxsEIHaVaxg8gi80GHy2eqYym+m LJH3AVnDjW4pdAIro2uRFdPPXWpcy/M03oqxysCbfK0HFcB77mSWpQbzjHGg3zknnH0kC8 lgnqmQwwjj5EZid/q6Vy4v3uRaKW/AHvwpJOk5MAcY9kaSUvncvTbMuMQ+vV9LUHK6sniq f5RvFkli8vLL7rQZppQc9vSOAnTaGnkHk6TQR8SZ4hH7LYuQ4YCovuBkKSBuNI1fSzRQzS kIbuW7+vlTJH+j6sZRcnoc89IiBzxbe27UH0U62dDUL7WqWPhM9NcFq/5J4JOw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1663886368; a=rsa-sha256; cv=none; b=JxLgePhBonNeJjaltGGBC4vS5N3urtepxHqXXQNjLQaTwLuWi+acI2JOwlioaFW+ZUj4EE mJd4KykS7uUy+yMiLbW2iIk4O+yasypXchmqrd7EiJKHBQb4RckBQI9pR+aFJJ8apN9Pjk LKwnOvk10NCuFjVdz/NRCE5jOS8Ynfy97Z/23oD+tkUqsRLMVi+mp5trvXQnE22+DnJzYr cUmRUbN3lJShHBsC2OIEANA4VquN++h65LQf1PfqUuVJF01ky7W6dUjDSWcatsAGsm0uyX 73l7jmC8yeJRF3+fm7D0wuuD7djSoUiHiG8AQmp6ccp6sL+4mSd2ibPTo+xomw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=00d8a28f19b21ce2955c0cf24a040824ec506da5 commit 00d8a28f19b21ce2955c0cf24a040824ec506da5 Author: Cy Schubert AuthorDate: 2022-09-22 18:26:23 +0000 Commit: Cy Schubert CommitDate: 2022-09-22 22:38:12 +0000 ipfilter/libipf: printpool_live() consumer ignores return code The single consumer of printpool_live() ignores the return code. Avoid wasting resources on this. MFC after: 2 weeks --- 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; }