svn commit: r351087 - head/usr.sbin/config

Warner Losh imp at FreeBSD.org
Thu Aug 15 17:06:53 UTC 2019


Author: imp
Date: Thu Aug 15 17:06:53 2019
New Revision: 351087
URL: https://svnweb.freebsd.org/changeset/base/351087

Log:
  Sort getopt(3) options and case statements per style(9)
  
  Alphebetize the options and cases without regard for case.

Modified:
  head/usr.sbin/config/main.c

Modified: head/usr.sbin/config/main.c
==============================================================================
--- head/usr.sbin/config/main.c	Thu Aug 15 16:58:00 2019	(r351086)
+++ head/usr.sbin/config/main.c	Thu Aug 15 17:06:53 2019	(r351087)
@@ -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));
@@ -135,15 +144,6 @@ main(int argc, char **argv)
 			break;
 		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++;


More information about the svn-src-all mailing list