Date: Fri, 17 May 2002 11:03:41 +0000 From: "J. Mallett" <jmallett@FreeBSD.ORG> To: Brian Somers <brian@Awfulhak.org> Cc: Mike Barcroft <mike@FreeBSD.org>, "J. Mallett" <jmallett@FreeBSD.org>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.bin/tee tee.c Message-ID: <20020517110339.GB9781@FreeBSD.ORG> In-Reply-To: <200205171041.g4HAfGWs090869@hak.lan.Awfulhak.org> References: <20020516231106.G66219@espresso.q9media.com> <200205171041.g4HAfGWs090869@hak.lan.Awfulhak.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, May 17, 2002 at 11:41:16AM +0100, Brian Somers wrote: > > J. Mallett <jmallett@FreeBSD.org> writes: > > > jmallett 2002/05/16 19:28:47 PDT > > > > > > Modified files: > > > usr.bin/tee tee.c > > > Log: > > > Remove spurious casts in malloc(3)'s argument. > > > > Okay. > > > > > Use `return' instead of `exit' at the bottom of main(). > > > > This part is wrong. The usual style for BSD software is to identify > > exit points with explicit exit() calls. > > I think this has been discussed a number of times on the lists. No > decision was made either way. style(9) says nothing about it. > > Personally I prefer return because of the C++ implications, but > that's a weak argument. I suspect the sysinstall crunch stuff > prefers return too (but that's a guess). > > So the ``wrongness'' was in changing exit to return, not the use of > either. It's up to the individual which they use, but people > shouldn't change from one to the other without a good reason. So control of the main() function doesn't end without a return as the compiler thinks because it doesn't realise exit() eats program flow. Still though, I can back it out. -- jmallett@FreeBSD.org | C, MIPS, POSIX, UNIX, BSD, IRC Geek. http://www.FreeBSD.org | The Power to Serve Vote for me for FreeBSD core or the cute little bunny gets it. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020517110339.GB9781>