From owner-freebsd-current@FreeBSD.ORG Thu Mar 2 17:11:23 2006 Return-Path: X-Original-To: freebsd-current@FreeBSD.ORG Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5FA1C16A420; Thu, 2 Mar 2006 17:11:23 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 018A843D55; Thu, 2 Mar 2006 17:11:22 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id k22H9EwB022314; Thu, 2 Mar 2006 10:09:14 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Thu, 02 Mar 2006 10:09:22 -0700 (MST) Message-Id: <20060302.100922.130234735.imp@bsdimp.com> To: cperciva@FreeBSD.ORG From: "M. Warner Losh" In-Reply-To: <4407226D.3050901@freebsd.org> References: <20060302105229.P83093@atlantis.atlantis.dp.ua> <20060302163633.H77029@fledge.watson.org> <4407226D.3050901@freebsd.org> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Thu, 02 Mar 2006 10:09:14 -0700 (MST) Cc: dmitry@atlantis.dp.ua, freebsd-current@FreeBSD.ORG, rwatson@FreeBSD.ORG Subject: Re: style(9) question X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Mar 2006 17:11:23 -0000 In message: <4407226D.3050901@freebsd.org> Colin Percival writes: : Robert Watson wrote: : > I can't really think of a good reason : > for return (foo) over return foo : : I'm not sure if this qualifies as a *good* reason, but : writing "return (foo)" is more consistent with other : keyword usage: "if (foo)", "for (foo)", "while (foo)", : "switch (foo)". Before 'void' existed, many people recommended () so that you could make 'return' a macro for extra debugging. With void functions that have naked returns make this impossible these days... Warner