Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Mar 2023 13:38:23 GMT
From:      Kristof Provost <kp@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: f5b204adf4a6 - main - ifconfig: remove unused variable
Message-ID:  <202303041338.324DcN8B005907@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by kp:

URL: https://cgit.FreeBSD.org/src/commit/?id=f5b204adf4a61e4040dc0af55662a0d22a8cf42b

commit f5b204adf4a61e4040dc0af55662a0d22a8cf42b
Author:     Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2023-03-02 09:30:57 +0000
Commit:     Kristof Provost <kp@FreeBSD.org>
CommitDate: 2023-03-04 10:19:12 +0000

    ifconfig: remove unused variable
    
    In printgroup() 'cnt' is set, but never read. Remove it.
    
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
---
 sbin/ifconfig/ifgroup.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sbin/ifconfig/ifgroup.c b/sbin/ifconfig/ifgroup.c
index 7f1173c316d7..c6f5c2959845 100644
--- a/sbin/ifconfig/ifgroup.c
+++ b/sbin/ifconfig/ifgroup.c
@@ -114,7 +114,7 @@ printgroup(const char *groupname)
 {
 	struct ifgroupreq	 ifgr;
 	struct ifg_req		*ifg;
-	int			 len, cnt = 0;
+	int			 len;
 	int			 s;
 
 	s = socket(AF_LOCAL, SOCK_DGRAM, 0);
@@ -140,7 +140,6 @@ printgroup(const char *groupname)
 	    ifg++) {
 		len -= sizeof(struct ifg_req);
 		printf("%s\n", ifg->ifgrq_member);
-		cnt++;
 	}
 	free(ifgr.ifgr_groups);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202303041338.324DcN8B005907>