Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Mar 2023 13:20:07 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: cc4adc4c4e47 - main - makefs: remove vestigial '?' cases from top-level getopt(3) loop
Message-ID:  <202303301320.32UDK72b051572@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=cc4adc4c4e473d47b687d2ac2757157abd728c81

commit cc4adc4c4e473d47b687d2ac2757157abd728c81
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2023-03-30 01:33:39 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2023-03-30 13:20:00 +0000

    makefs: remove vestigial '?' cases from top-level getopt(3) loop
    
    getopt(3) returns '?' when it encounters a flag not present in the in
    the optstring or if a flag is missing its option argument.  We can
    handle this case with the "default" failure case with no loss of
    legibility.
    
    Obtained from:  OpenBSD makefs.c 1.22
---
 usr.sbin/makefs/makefs.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/usr.sbin/makefs/makefs.c b/usr.sbin/makefs/makefs.c
index 2b97c7643e1a..e775b72fd4bb 100644
--- a/usr.sbin/makefs/makefs.c
+++ b/usr.sbin/makefs/makefs.c
@@ -273,7 +273,6 @@ main(int argc, char *argv[])
 			fsoptions.sparse = 1;
 			break;
 
-		case '?':
 		default:
 			usage(fstype, &fsoptions);
 			/* NOTREACHED */



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