From owner-cvs-all Fri May 17 4: 3:12 2002 Delivered-To: cvs-all@freebsd.org Received: from durham-ar1-4-64-252-019.durham.dsl-verizon.net (durham-ar1-4-64-252-019.durham.dsl-verizon.net [4.64.252.19]) by hub.freebsd.org (Postfix) with SMTP id 02E8D37B404 for ; Fri, 17 May 2002 04:03:05 -0700 (PDT) Received: (qmail 18626 invoked by uid 1001); 17 May 2002 11:03:41 -0000 Date: Fri, 17 May 2002 11:03:41 +0000 From: "J. Mallett" To: Brian Somers Cc: Mike Barcroft , "J. Mallett" , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.bin/tee tee.c Message-ID: <20020517110339.GB9781@FreeBSD.ORG> References: <20020516231106.G66219@espresso.q9media.com> <200205171041.g4HAfGWs090869@hak.lan.Awfulhak.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200205171041.g4HAfGWs090869@hak.lan.Awfulhak.org> User-Agent: Mutt/1.3.27i Organisation: The FreeBSD Project Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, May 17, 2002 at 11:41:16AM +0100, Brian Somers wrote: > > J. Mallett 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