git: 8f8da1bcc799 - main - seq: style(9) cleanup

From: Ed Maste <emaste_at_FreeBSD.org>
Date: Fri, 21 Jul 2023 14:24:13 UTC
The branch main has been updated by emaste:

URL: https://cgit.FreeBSD.org/src/commit/?id=8f8da1bcc799c3ffc306ae7cb37c6591c629d709

commit 8f8da1bcc799c3ffc306ae7cb37c6591c629d709
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2023-06-25 23:33:49 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2023-07-21 14:17:24 +0000

    seq: style(9) cleanup
    
    This is in part for diff reduction with OpenBSD.
    
    Sponsored by:   The FreeBSD Foundation
---
 usr.bin/seq/seq.c | 31 +++++++++++++++----------------
 1 file changed, 15 insertions(+), 16 deletions(-)

diff --git a/usr.bin/seq/seq.c b/usr.bin/seq/seq.c
index d1d2cfbf17ed..d3d074985d85 100644
--- a/usr.bin/seq/seq.c
+++ b/usr.bin/seq/seq.c
@@ -57,8 +57,7 @@ __FBSDID("$FreeBSD$");
 static const char *decimal_point = ".";	/* default */
 static char default_format[] = { "%g" };	/* default */
 
-static const struct option long_opts[] =
-{
+static const struct option long_opts[] = {
 	{"format",	required_argument,	NULL, 'f'},
 	{"separator",	required_argument,	NULL, 's'},
 	{"terminator",	required_argument,	NULL, 't'},
@@ -106,9 +105,9 @@ main(int argc, char *argv[])
 		decimal_point = locale->decimal_point;
 
 	/*
-         * Process options, but handle negative numbers separately
-         * least they trip up getopt(3).
-         */
+	 * Process options, but handle negative numbers separately
+	 * least they trip up getopt(3).
+	 */
 	while ((optind < argc) && !numeric(argv[optind]) &&
 	    (c = getopt_long(argc, argv, "+f:hs:t:w", long_opts, NULL)) != -1) {
 
@@ -156,7 +155,7 @@ main(int argc, char *argv[])
 		incr = e_atof(argv[1]);
 		/* Plan 9/GNU don't do zero */
 		if (incr == 0.0)
-			errx(1, "zero %screment", (first < last)? "in" : "de");
+			errx(1, "zero %screment", (first < last) ? "in" : "de");
 	}
 
 	/* default is one for Plan 9/GNU work alike */
@@ -176,7 +175,7 @@ main(int argc, char *argv[])
 		if (!valid_format(fmt))
 			errx(1, "invalid format string");
 		/*
-	         * XXX to be bug for bug compatible with Plan 9 add a
+		 * XXX to be bug for bug compatible with Plan 9 add a
 		 * newline if none found at the end of the format string.
 		 */
 	} else
@@ -297,18 +296,18 @@ valid_format(const char *fmt)
 
 		/* conversion */
 		switch (*fmt) {
-		    case 'A':
-		    case 'a':
-		    case 'E':
-		    case 'e':
-		    case 'F':
-		    case 'f':
-		    case 'G':
-		    case 'g':
+		case 'A':
+		case 'a':
+		case 'E':
+		case 'e':
+		case 'F':
+		case 'f':
+		case 'G':
+		case 'g':
 			/* floating point formats are accepted */
 			conversions++;
 			break;
-		    default:
+		default:
 			/* anything else is not */
 			return 0;
 		}