Sort getopt(3) options and case statements per style(9)

Alphebetize the options and cases without regard for case.
This commit is contained in:
Warner Losh 2019-08-15 17:06:53 +00:00
parent a521fa63c2
commit 0a829d84d0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=351087

View File

@ -120,11 +120,20 @@ main(int argc, char **argv)
printmachine = 0;
kernfile = NULL;
SLIST_INIT(&includepath);
while ((ch = getopt(argc, argv, "CI:d:gmps:Vx:")) != -1)
while ((ch = getopt(argc, argv, "Cd:gI:mps:Vx:")) != -1)
switch (ch) {
case 'C':
filebased = 1;
break;
case 'd':
if (*destdir == '\0')
strlcpy(destdir, optarg, sizeof(destdir));
else
errx(EXIT_FAILURE, "directory already set");
break;
case 'g':
debugging++;
break;
case 'I':
ipath = (struct includepath *) \
calloc(1, sizeof (struct includepath));
@ -136,15 +145,6 @@ main(int argc, char **argv)
case 'm':
printmachine = 1;
break;
case 'd':
if (*destdir == '\0')
strlcpy(destdir, optarg, sizeof(destdir));
else
errx(EXIT_FAILURE, "directory already set");
break;
case 'g':
debugging++;
break;
case 'p':
profiling++;
break;