From owner-freebsd-hackers Tue Oct 23 10:53:16 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mail5.speakeasy.net (mail5.speakeasy.net [216.254.0.205]) by hub.freebsd.org (Postfix) with ESMTP id 3732437B437 for ; Tue, 23 Oct 2001 10:52:51 -0700 (PDT) Received: (qmail 31487 invoked from network); 23 Oct 2001 17:52:50 -0000 Received: from unknown (HELO laptop.baldwin.cx) ([64.81.54.73]) (envelope-sender ) by mail5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 23 Oct 2001 17:52:50 -0000 Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20011023174220.BA0EB380A@overcee.netplex.com.au> Date: Tue, 23 Oct 2001 10:52:49 -0700 (PDT) From: John Baldwin To: Peter Wemm Subject: Re: getenv_foo and TUNABLE_FOO_FETCH change Cc: hackers@FreeBSD.ORG Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 23-Oct-01 Peter Wemm wrote: > John Baldwin wrote: > >> Also, one final note about using do { } while(0). If you actually read >> style(9), you will see that you are supposed to use it for compound >> statement > s, >> not just for any macro that happens to be more than one line long. If the >> macro's body is a single statement, it doesn't need the do { } while (0) >> bit. > > It was there so that the macro didn't have a "value". Since you're > changing this so they all have a meaningful return (eg: TUNABLE_STR_FETCH() > did not before) then removing this makes sense. Fair enough. It was more a side commentary as I've seen random commits that make this mistake on other macros. -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message