Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Jun 2023 15:03:01 GMT
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: e77b2ea427c8 - main - ifconfig: set boolean to true rather than incrementing
Message-ID:  <202306191503.35JF31L3034158@gitrepo.freebsd.org>

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

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

commit e77b2ea427c8aad502e0b56954745570e2fc8cd2
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2023-06-19 15:01:08 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2023-06-19 15:02:38 +0000

    ifconfig: set boolean to true rather than incrementing
    
    GCC warns about "increment of a boolean expression."
    
    Reported by:    amd64-gcc12 Cirrus-CI run
    Sponsored by:   The FreeBSD Foundation
---
 sbin/ifconfig/ifconfig.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c
index fa22f09f8100..6d66677467c1 100644
--- a/sbin/ifconfig/ifconfig.c
+++ b/sbin/ifconfig/ifconfig.c
@@ -501,7 +501,7 @@ args_parse(struct ifconfig_args *args, int argc, char *argv[])
 			args->printkeys = true;
 			break;
 		case 'l':	/* scan interface names only */
-			args->namesonly++;
+			args->namesonly = true;
 			break;
 		case 'm':	/* show media choices in status */
 			args->supmedia = true;



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