From nobody Thu Oct 06 13:57:07 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 4MjtKb598Xz4dg33; Thu, 6 Oct 2022 13:57: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 4MjtKb2yr9z3GX9; Thu, 6 Oct 2022 13:57:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665064627; 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=h2FbvwgC7AHA2eCPVDoZfjhBHCc3ArJmAWAgtGuD60w=; b=kgxgDOPZZE9euYUzLZIX+Siku9n71ZHjacM38nbOptoCQUpIV/fcEeFGraTfmRAHtZdNOB XFMLQ1SxAOIxLDrFLK87Otrr0PUSat9gBiqPR7IwASLRCX/+SiOWh4hLv1QOVBPFl+iYcP wCX6P7/P9oiaJPYqXBx2JZHge7YFiRGg/QjTdc9RmGpVHDZ5EN+p9OUIX4E/KHixoOSwgu ipQ995/wc8/EKrIR1bHT35ABL8ii3DntQqCi7M0Ci9fvX7LBmDH/xKFPXHHLHtVN/eegql jZHxlVhh91uYEia+xKlexcOJ0D8sH01NqlG9z4wYJus9eYG4m/rs9vO7hEHBQw== 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 4MjtKb1R8kzGr3; Thu, 6 Oct 2022 13:57:07 +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 296Dv7qJ042704; Thu, 6 Oct 2022 13:57:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 296Dv7Vg042703; Thu, 6 Oct 2022 13:57:07 GMT (envelope-from git) Date: Thu, 6 Oct 2022 13:57:07 GMT Message-Id: <202210061357.296Dv7Vg042703@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: a993eeb44de0 - stable/13 - 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/13 X-Git-Reftype: branch X-Git-Commit: a993eeb44de051b5be8d08cab8d122a889cb7b8e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665064627; 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=h2FbvwgC7AHA2eCPVDoZfjhBHCc3ArJmAWAgtGuD60w=; b=g1hW2uLCQw7sShi1EQ6/NQ28g4DJxOFJp360XeDl3S1u5idmgbweCk/l4445LSheNGR1Tt na3uc1TxMJXHJi7vWMz8uyUt9F2u5RgUN4XJNU+5EFYUMywRet4YRQ4wQIZwpDBgCJW7Ie qXDwP8DJpuzztlG06DpMP0npZaC+W9wiU8KZ6YjOO88VzKmuXEt8acOsKRC9nhMCurpPGl 1raQdAUGblgAfKEv05F18icRU7/lSo9MFM+oFALDl43wPRltAvfOdAtQiKTC0v2QdRArrp hYMvxtZMVzMTqZy7i+LEWfA2u8Zi7/f7/AKckg7X5Wv1sWTRYVdzzaJzlacC3g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1665064627; a=rsa-sha256; cv=none; b=nyusyR1x8BTx8SDcfR6lNxHHSAs5UIUFGH6IvTnXloXMMVUjHHI1A8VSrvVES8JqY0IbN4 Ytf82U7+jyKDQ6qzWDkmIwOjR4c1Yxgj6n5Zb++wW2eTrFEyFxjPReQENBQALwbhsESgRr KdJPIHkolUSbVH/0dHpsRtPpz0WImB7wkNVwZm3P+TX1kh0aYxhKeqH/O3GZlfJwl1soT2 RIDgrKmRvsSmBc5UMAEaxpaSei1zcbIRgy6/XYY+MII9x4dvM6LD0eHt5dDS9cl/bkxFBU mJcSl1HV12+RQ63ir7MOADpmaGHkWFs/BFBBvNVHzQwhjfhyChKw9bpPEB3bqA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=a993eeb44de051b5be8d08cab8d122a889cb7b8e commit a993eeb44de051b5be8d08cab8d122a889cb7b8e Author: Cy Schubert AuthorDate: 2022-09-22 18:26:23 +0000 Commit: Cy Schubert CommitDate: 2022-10-06 13:56: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; }