git: e77b2ea427c8 - main - ifconfig: set boolean to true rather than incrementing

From: Ed Maste <emaste_at_FreeBSD.org>
Date: Mon, 19 Jun 2023 15:03:01 UTC
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;