bug-findutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Use 'return' from main() instead of calling exit()


From: Bob Proulx
Subject: Re: [PATCH] Use 'return' from main() instead of calling exit()
Date: Sat, 23 Oct 2004 13:49:37 -0600
User-agent: Mutt/1.5.6+20040907i

Petter Reinholdtsen wrote:
> [Bob Proulx]
> > Consider that return is a keyword, not a function, and parentheses
> > around the value are not required.  They just make return look like a
> > function and it is not.  I know you simply converted the exits to
> > returns and probably missed that.
> 
> I didn't miss it.  I just assumed this was the wanted coding standard,
> and tried to follow the existing notation.  I guess I
> misunderstood. :)

I am not the maintainer and he will have the final say.

Looking at the existing code just now I see a mix of returns with
parens and without parens.  So it could go either way to stay with the
existing style.  I apologize that I only looked at your patch in
isolation.

My opinion is that the parens after the return keyword are misleading
because they make the return look like a function call.  But of course
it is not.  It is more like a goto.  But I don't want to get into a
style debate.  Well, obviously I started it, but I don't want to
continue it. :-)

Bob




reply via email to

[Prev in Thread] Current Thread [Next in Thread]