From nobody Fri Jul 21 14:24:13 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4R6sHx636Mz4dRmv; Fri, 21 Jul 2023 14:24:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4R6sHx4WHcz3xVZ; Fri, 21 Jul 2023 14:24:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689949453; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7O79qE+7xceASpgC0j2hYUdOmjwQhsWjKg4iywwcI0E=; b=WuAhWE+XrRHklOmWaLDsJAdv1VfqPhcPEtbyTG2bkUGLT2HCCBm7FOggQWariGdliTORt5 lskGri9slEEC4ZqlLdQfsA+X0/88uGWhAhcygBduO0s+uJz9dwvx4pD4svIunSgf39Zsfc IJR1TLP0ycrfdfl1KxrHwlxgcmVjqrsjt8TUjqc7ZSpvgIvOjdNhjUQL73sxMiH1tZiVb4 1ztnG72GbC0jN5hxggY2N62dwhlnbAysPnkDDyV3fbNPP502C0y5K0VlWYl1DY2WLf9NnY Ntl0JTTDLfM/zF1ScVx66iQrP//Y8QLtMg4LqXGJeb3DlshsB7Rgx9gdsi6h4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689949453; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7O79qE+7xceASpgC0j2hYUdOmjwQhsWjKg4iywwcI0E=; b=Lbg0eVRbls+vNpyWbdh2/FrJH43bpj0y67prMXF8Y5xTPnNzhmOzULz+42v7Py7GZlUrpo HMUWtHpWPydh/iDZWSQvzLuJgNwCa0X9fUFYkaYU02vhEViCbKwFC8NpQL6VKnqHavQrWn dP7Tz0ggdQ3oKc/rievx1YAkx6hhxRnu7+cTSDCm1ihEoFwDMK36hi6Ra6FN89Mnbd/CRC YiSAbPam/6MJ3WhULEIaRCsWSYlncoM1pgipG6dA+PudzMqbaxq8anmUMDXdcMhvz45JDf AH1IC9+5e5EMccuWgSEvoFpZrV/65B+rZBfIMsu9mutoLELKNUYgROSTIpuUvg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1689949453; a=rsa-sha256; cv=none; b=G6SQ9y9q4Qa9bJw0hjDQgK/9M+QP04MLoUlM6kP+HTZlx8XRESjVsNOPLA769SWur5EtbE G1h7JWWpzOoplDOAc3TF02xsLB68cb9zdtSkmVZ7ljT3vWXMjEtlxp3pMKMXZKSh21+Auz RzsnasJ/7cBtUVHsmsN0MLf6hxO+9mc2YwBBimvHkzkm2LwGIzzEzxWd102jCSFssl79YW zxbtBJgfeFw+gyihhdzFiXBlydCE326B/SaXSX7pt+f0wq1QZy7qNf0jXPJmRHNgc/N3Qc OIBmd8YlyokYtp7uHdnKSNKGPocRqzsxSs1VBMJ/NOpdjoMYdVMvwmxjKskD+A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4R6sHx3bXNzGlH; Fri, 21 Jul 2023 14:24:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 36LEODoV091789; Fri, 21 Jul 2023 14:24:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36LEODBt091788; Fri, 21 Jul 2023 14:24:13 GMT (envelope-from git) Date: Fri, 21 Jul 2023 14:24:13 GMT Message-Id: <202307211424.36LEODBt091788@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 8f8da1bcc799 - main - seq: style(9) cleanup List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8f8da1bcc799c3ffc306ae7cb37c6591c629d709 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=8f8da1bcc799c3ffc306ae7cb37c6591c629d709 commit 8f8da1bcc799c3ffc306ae7cb37c6591c629d709 Author: Ed Maste AuthorDate: 2023-06-25 23:33:49 +0000 Commit: Ed Maste 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; }