Date: Fri, 14 Apr 2023 12:52:47 GMT From: Ed Maste <emaste@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 57f6ba0e3878 - stable/13 - makefs: remove vestigial '?' cases from top-level getopt(3) loop Message-ID: <202304141252.33ECqlou074726@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=57f6ba0e387836c6d7356829d71c30ef96e914cb commit 57f6ba0e387836c6d7356829d71c30ef96e914cb Author: Ed Maste <emaste@FreeBSD.org> AuthorDate: 2023-03-30 01:33:39 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2023-04-14 12:10:36 +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 (cherry picked from commit cc4adc4c4e473d47b687d2ac2757157abd728c81) --- 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 987f4159b403..7f23b8a6a5f1 100644 --- a/usr.sbin/makefs/makefs.c +++ b/usr.sbin/makefs/makefs.c @@ -270,7 +270,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?202304141252.33ECqlou074726>