Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Mar 2006 17:12:09 +0000 (GMT)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Colin Percival <cperciva@freebsd.org>
Cc:        Dmitry Pryanishnikov <dmitry@atlantis.dp.ua>, freebsd-current@freebsd.org
Subject:   Re: style(9) question
Message-ID:  <20060302171112.A77029@fledge.watson.org>
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
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060302171112.A77029>