From owner-freebsd-current@FreeBSD.ORG Thu Mar 2 17:07:37 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 E454216A420; Thu, 2 Mar 2006 17:07:37 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 381AB43D55; Thu, 2 Mar 2006 17:07:37 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 96F2646B45; Thu, 2 Mar 2006 12:07:17 -0500 (EST) Date: Thu, 2 Mar 2006 17:12:09 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Colin Percival In-Reply-To: <4407226D.3050901@freebsd.org> Message-ID: <20060302171112.A77029@fledge.watson.org> References: <20060302105229.P83093@atlantis.atlantis.dp.ua> <20060302163633.H77029@fledge.watson.org> <4407226D.3050901@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Dmitry Pryanishnikov , freebsd-current@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:07:38 -0000 On Thu, 2 Mar 2006, Colin Percival wrote: > 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)". I also find myself doing search and replace on return values more on FreeBSD source than I do on other source. I.e.: s/return (0)/return (NULL)/ and that sort of thing. I think I would be less comfortable doing that without the parens. Again, whether that's just habit or a real reason is hard to say. Robert N M Watson