Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Aug 2019 17:06:53 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r351087 - head/usr.sbin/config
Message-ID:  <201908151706.x7FH6reN029248@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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++;



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