From nobody Wed Dec 27 16:11:10 2023 X-Original-To: dev-commits-src-main@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 4T0c811z3Yz55tD6; Wed, 27 Dec 2023 16:11:13 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T0c811SS5z3Q4s; Wed, 27 Dec 2023 16:11:13 +0000 (UTC) (envelope-from kevans@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1703693473; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=S47zGm1RsV6Qz7fXZGgok5Q7FSRcXgsRqT2XoXMFPco=; b=v7i6CisWvi5Ny5eObuwquZ/VByflvQlVu6VooeP2umcc9YG1VfG00YPlhhvez6YsmJLSnS 2O/QRV18k4hb8HFUy0fmYgskhcnmkGnBvAeGX9Pv9IDxXg6VQhr/9q39169hLNeDSFMHKQ SMKLAN+II1ULdqKcl5SZTG/LpVMx3f3v28RsCFRsAQUG6tvRcFbQg4JIsdneojuggavjpo XZIQkagu6x3Sh4FKB9pFsxH0ioGRZ700GsLqJgtXib0uHaPuzJiXfUbqLHeZj2sF1Ya64h d0HUd0gH69GTWiXB5wqcGdnNHQHeBYeaEFsPAoasCqCfHyMzsToBCGJAzK0AyA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1703693473; a=rsa-sha256; cv=none; b=Hsx7uoFs2epr/MWLFSGy0TJWkKQ5YKMwT+V9NSiRuI6AnFFJ51iLJGAPs36tD/BL2HkY2W t76hRfODgKlXpH5tHUSox20t9GQ0K272rwD9bZgaW4GeoGbt4gXklOlNV8W2JvPbLJc6UQ miAs4qKyD3d0QLsVDobNH0N6PdfkDj/RJ+0pco1utqooVnvJ90xZ+zP/T4RfHNO3u9SFte BKgmCTnY74QcNT1QSr/VaObvnLKTX1+v3mLhUAz0ZjLhu5MU3G9yOh88VkrLHCARhPHF6C iKGvGB5HSMCZXsXCpYuQ55xP9Jgok/wDEnX2dq2x3D3rtl+uON+/HrGmFmbIZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1703693473; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=S47zGm1RsV6Qz7fXZGgok5Q7FSRcXgsRqT2XoXMFPco=; b=hRt3+vsHLoBwRjy0HWKMJkt5rdby/Rb16NrEIz4+oJ/rW96dNT2+FDBaUGK9XGwuEQJWzP sxzCS0imQxS04QJPEoTerKbQxSkFBJYtOd1PonSuTJHs4w5mwLRRbevFKvXcoVrazXj6H0 aGU4y8dk2RSvvKnp0FdI0CMkSaaz/hDC/fwt2jedaExVQjRyVEU4sQJgcUvccw+TNi9pan R3sjFA24ikN2BtgvhwXGWREVV83uVqBmelctj/2mDd5Yxp6Ak9iJ3xTjr0JdJSbu/a1g/r IAuBkDV66r8goyTi/7P1YGHPM/E8HyR75UDNYMWJxLAUC1Djbgv8/M9E1UtcOg== Received: from [10.9.4.95] (unknown [209.182.120.176]) (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 did not present a certificate) (Authenticated sender: kevans/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4T0c803nSdz158x; Wed, 27 Dec 2023 16:11:12 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Message-ID: <6ac83dfe-bfeb-4135-9292-d7625d6da642@FreeBSD.org> Date: Wed, 27 Dec 2023 10:11:10 -0600 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 6ac7c9f06ae9 - main - daemon: remove redundant parameter from listen_child() To: Warner Losh , Konstantin Belousov Cc: Alexey Dokuchaev , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202312270608.3BR688vs024888@gitrepo.freebsd.org> Content-Language: en-US From: Kyle Evans In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 12/27/23 09:48, Warner Losh wrote: > > > On Wed, Dec 27, 2023 at 8:31 AM Alexey Dokuchaev > wrote: > > On Wed, Dec 27, 2023 at 04:49:20PM +0200, Konstantin Belousov wrote: > > On Wed, Dec 27, 2023 at 06:08:08AM +0000, Kyle Evans wrote: > > > commit 6ac7c9f06ae9b7ef070c1f8a57dcc52be4dd45b7 > > > > > >   daemon: remove redundant parameter from listen_child() > > > > > >   state already contains pipe fd > > > ... > > > @@ -448,9 +448,7 @@ daemon_eventloop(struct daemon_state *state) > > >                                     /* child is dead, read all > until EOF */ > > >                                     state->pid = -1; > > >                                     state->mode = MODE_NOCHILD; > > > -                                   while > (listen_child(state->pipe_fd[0], > > > -                                       state)) > > > -                                           ; > > > +                                   while (listen_child(state)); > > > > This line is the style regression. > > We've seen this before and I reckon these regressions would keep > happening > when semicolon is put on the new line by itself alone.  This would > be less > likely to happen and makes the intention more obvious to say > ``continue;''. > > > fwiw, that was the recommendation of the 'old unix hands' on USENET > in the mid 80s.  It made the intention clear. I was told, but never > encountered, > that some linting tools will warn about the above style but not while > (foo) continue; > and so that's been my personal style ever since. I've debugged lots of > code that > used this style, and it's a bugger to sort out if the indentation is > correct and the ; > is intended at the end of the line, or if it was intended... > > Warner Both of these fixed in e064557916a905d0add20c4012cf3678131c11e7, thanks. I also like the more explicit form here.