Date: Mon, 28 Mar 2011 16:12:37 -0700 From: Doug Barton <dougb@FreeBSD.org> To: Warner Losh <imp@bsdimp.com> Cc: Josh Paetzel <jpaetzel@FreeBSD.org>, svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, kib@FreeBSD.org Subject: Re: svn commit: r220059 - head/usr.sbin/pc-sysinstall/backend Message-ID: <4D9115E5.3040008@FreeBSD.org> In-Reply-To: <EB25EDF1-9904-4329-9E52-6F3F122754A9@bsdimp.com> References: <201103271657.p2RGvs2m063692@svn.freebsd.org> <4D8F7257.50207@FreeBSD.org> <EB25EDF1-9904-4329-9E52-6F3F122754A9@bsdimp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 03/27/2011 15:29, Warner Losh wrote: > > On Mar 27, 2011, at 11:22 AM, Doug Barton wrote: > >> On 03/27/2011 09:57, Josh Paetzel wrote: >>> Replace "$?" = "0" with $? -eq 0 in tests >> >> Excellent! > > Most of the time I've found that moving the command up to the if makes the code clearer too. At jobs I've had in the past when I've written code similar to what we have here, it almost always got flagged... In general I agree with you. I did take a look at the specific cases where the -eq 0 changes were made and IMO it's about 50/50 whether that would actually be an optimization, or if leaving it as is makes the code more readable. I chose to go with "focus on the positive." :) Doug -- Nothin' ever doesn't change, but nothin' changes much. -- OK Go Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4D9115E5.3040008>