From owner-svn-src-all@freebsd.org Wed Jun 17 03:54:02 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5E43E3413A8 for ; Wed, 17 Jun 2020 03:54:02 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qv1-xf30.google.com (mail-qv1-xf30.google.com [IPv6:2607:f8b0:4864:20::f30]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49mrlr5xYXz4DW7 for ; Wed, 17 Jun 2020 03:54:00 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qv1-xf30.google.com with SMTP id cv17so379613qvb.13 for ; Tue, 16 Jun 2020 20:54:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=u6ySZo3ICappC9OKl9BUe1M7XGf7Ejn8Yhc6ifTE5z0=; b=HBYCcsAp/Q79HY/Xd/Hgl1m2381ltTQQq+LIMUzDiJ15RKuPV8HXqhr+nGxXlzCE0h qCc8XCHjWIqvvenTKGwN4ge11EpkAidWHFurQbzsImXMm2IXeklrdqAEUZX9FNU2/Nj3 iTy1PuIIlPWvUDHNkbC8dHhYK2jxmg0wnu7RBo7+nNjMC7GewlsdAOQipLegFLFKiNtl t2UJdVpyxhyv1QiPbuMmimOWlPktDbMEnuRTJSGbdtw0/8UnenRgrPnLcvTQlUmGIHeq zekVPGoRH9R2KolplUQqzeIM4H+jyOJ9J/aAHPzeEGeZwbzkBIKwnceRBqACnC+lqrtl 7uRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=u6ySZo3ICappC9OKl9BUe1M7XGf7Ejn8Yhc6ifTE5z0=; b=HxwYax3lvcl156xxraTVytXfYdLOamaMvhmO22gFiBsT9NcA4YIullc6pUed0l99LP yCb3uPxXtLN0cvfxIxdyWeuE0OiM+PFjdA9cLFEdF8jkJhh8gxbHAwthjXvsXPU09TTN 1qcdtGKeq/zDsRHJ32R+MU7djC4fzDhzM8avWLf1ku8dcvAmm/CRSlzdl7I7SdQplo9F a4pjoK3idU0W54MURooG8RaU/SNGbWLOjolJkhSECVurkiGHo9RZBZnfW0cmT7+pO4i4 l4zI5W51Jw3fksctfm3vM7WLSD+iuWHr08moJjKxC9wbdDRUIkloq8ukKbOmbX/M8/V5 /+hg== X-Gm-Message-State: AOAM531UBhKZtY2jOzkrEKVovP9uQAPMmZ9CcX4EBP8vh0ZapfaONgcE 7OcKbpCb0mW4iwj2MkyfBqCswQ/zUZA5xUF3rvtItw== X-Google-Smtp-Source: ABdhPJwLlHb2kVJGkivZEOD4b79a3IdtY4fg5XwUdZM+/xYlVOgSHn5H+tb6Tstjg1bZ5j0D7EuHxD3/XQIEU+bpP/Y= X-Received: by 2002:a05:6214:17cb:: with SMTP id cu11mr5560517qvb.202.1592366039720; Tue, 16 Jun 2020 20:53:59 -0700 (PDT) MIME-Version: 1.0 References: <202006160705.05G753T4057972@repo.freebsd.org> <55903c38d363aef2a6f6d0075dd4526b86d51258.camel@freebsd.org> <8948411d5bb0ab7ffae4c9cba06bda7b8943e0cd.camel@freebsd.org> In-Reply-To: <8948411d5bb0ab7ffae4c9cba06bda7b8943e0cd.camel@freebsd.org> From: Warner Losh Date: Tue, 16 Jun 2020 21:53:48 -0600 Message-ID: Subject: Re: svn commit: r362217 - head/stand/common To: Ian Lepore Cc: Kristof Provost , Ed Maste , Toomas Soome , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 49mrlr5xYXz4DW7 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=HBYCcsAp; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::f30) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-1.86 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; NEURAL_HAM_MEDIUM(-0.91)[-0.914]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-0.76)[-0.756]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; NEURAL_HAM_SHORT(-0.19)[-0.192]; RCPT_COUNT_SEVEN(0.00)[7]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::f30:from]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jun 2020 03:54:02 -0000 On Tue, Jun 16, 2020 at 8:33 PM Ian Lepore wrote: > On Tue, 2020-06-16 at 19:34 +0200, Kristof Provost wrote: > > On 16 Jun 2020, at 19:11, Ed Maste wrote: > > > On Tue, 16 Jun 2020 at 13:01, Ian Lepore wrote: > > > > > > > > As much as I prefer doing it this way, style(9) doesn't allow for > > > > variable declarations inside a for() statement (or even inside a > > > > local > > > > block, which is just too 1980s for me, but it is still our standard= ). > > > > > > Perhaps it's time to update style(9) to at least permit these uses, a= s > > > we've done with the blank line at the beginning of functions with no > > > local variables, and with braces around single-line bodies. > > > > We have 431 instances of `for (int i` in sys alone. It=E2=80=99s not so= much a > > question of allowing it as acknowledging reality at this point. > > > > Best regards, > > Kristof > > Hmm, so we do. If you weed out sys/contrib, and device drivers > contributed by vendors, the number is a lot smaller, but still big > enough that we should just change the rules I think. > We should definitely just change the rules. There's no point in prohibiting it. Contributors have already voted with their feet diff --git a/share/man/man9/style.9 b/share/man/man9/style.9 index 4e801bbcbe70..fd23d573eb00 100644 --- a/share/man/man9/style.9 +++ b/share/man/man9/style.9 @@ -592,8 +592,6 @@ not Parts of a .Ic for loop may be left empty. -Do not put declarations -inside blocks unless the routine is unusually complicated. .Bd -literal for (; cnt < 15; cnt++) { stmt1; Although the block doesn't start until { so int i; in the commit technically doesn't violate this rule. We violate it in dozens of other ways than this. Warner