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/

_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to