Re: style(9) and return statements

2006-04-30 Thread Theo de Raadt
Any way which is not a real bug or hole. > I wonder what the preferred style of return statments is -- for > returning simple values, both styles > > return foo; > > and > > return (foo); > > are used in the sources everythen and now. For me, the latter hurts > my eyes, since retur

Re: style(9) and return statements

2006-04-30 Thread Ted Unangst
On 4/30/06, Matthias Kilian <[EMAIL PROTECTED]> wrote: On Sun, Apr 30, 2006 at 09:18:05PM +0100, Nick Guenther wrote: > I was wondering this myself last week, but I remembered that someone > once said "check all the examples before deciding style(9) is silent > on an issue" and so I did. The exam

Re: style(9) and return statements

2006-04-30 Thread Tony
Matthias Kilian wrote: > > On Sun, Apr 30, 2006 at 03:44:13PM -0500, [EMAIL PROTECTED] wrote: > > There is a > > return (eight); > > in man style. > > But in err() context. > > > I suspect that bad things can happen with macros > > when you do only sensible things with parens. > > Good poin

Re: style(9) and return statements

2006-04-30 Thread Matthias Kilian
On Sun, Apr 30, 2006 at 03:44:13PM -0500, [EMAIL PROTECTED] wrote: > There is a > return (eight); > in man style. But in err() context. > I suspect that bad things can happen with macros > when you do only sensible things with parens. Good point, but if a macro `foo' works with retu

Re: style(9) and return statements

2006-04-30 Thread Matthias Kilian
On Sun, Apr 30, 2006 at 09:18:05PM +0100, Nick Guenther wrote: > I was wondering this myself last week, but I remembered that someone > once said "check all the examples before deciding style(9) is silent > on an issue" and so I did. The examples all use `return (expr);`. Have a look at usr.bin/ft

Re: style(9) and return statements

2006-04-30 Thread Tony
Nick Guenther wrote: > > On 4/30/06, Matthias Kilian <[EMAIL PROTECTED]> wrote: > > Hi! > > > > I wonder what the preferred style of return statments is -- for > > returning simple values, both styles > > > > return foo; > > > > and > > > > return (foo); > > > > are used in the sou

Re: style(9) and return statements

2006-04-30 Thread Nick Guenther
On 4/30/06, Matthias Kilian <[EMAIL PROTECTED]> wrote: Hi! I wonder what the preferred style of return statments is -- for returning simple values, both styles return foo; and return (foo); are used in the sources everythen and now. For me, the latter hurts my eyes, since ret

style(9) and return statements

2006-04-30 Thread Matthias Kilian
Hi! I wonder what the preferred style of return statments is -- for returning simple values, both styles return foo; and return (foo); are used in the sources everythen and now. For me, the latter hurts my eyes, since return just expects an rvalue which doesn't need brackets (e