Date: Thu, 02 Mar 2006 10:09:22 -0700 (MST) From: "M. Warner Losh" <imp@bsdimp.com> To: cperciva@FreeBSD.ORG Cc: dmitry@atlantis.dp.ua, freebsd-current@FreeBSD.ORG, rwatson@FreeBSD.ORG Subject: Re: style(9) question Message-ID: <20060302.100922.130234735.imp@bsdimp.com> In-Reply-To: <4407226D.3050901@freebsd.org> References: <20060302105229.P83093@atlantis.atlantis.dp.ua> <20060302163633.H77029@fledge.watson.org> <4407226D.3050901@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
In message: <4407226D.3050901@freebsd.org>
Colin Percival <cperciva@freebsd.org> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060302.100922.130234735.imp>
