From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lx62i-0003xK-0m for qemu-devel@nongnu.org; Thu, 23 Apr 2009 17:01:12 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lx62c-0003wd-Is for qemu-devel@nongnu.org; Thu, 23 Apr 2009 17:01:10 -0400 Received: from [199.232.76.173] (port=55628 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lx62c-0003wa-BT for qemu-devel@nongnu.org; Thu, 23 Apr 2009 17:01:06 -0400 Received: from caffeine.csclub.uwaterloo.ca ([129.97.134.17]:46043) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Lx62b-00008V-Re for qemu-devel@nongnu.org; Thu, 23 Apr 2009 17:01:06 -0400 Date: Thu, 23 Apr 2009 17:01:04 -0400 Subject: Re: [Qemu-devel] [7234] Use a more natural order Message-ID: <20090423210104.GP3795@csclub.uwaterloo.ca> References: <20090423192844.GJ3795@csclub.uwaterloo.ca> <20090423.134136.-135509976.imp@bsdimp.com> <20090423195553.GM3795@csclub.uwaterloo.ca> <20090423.140735.-2001112580.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090423.140735.-2001112580.imp@bsdimp.com> From: lsorense@csclub.uwaterloo.ca (Lennart Sorensen) List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "M. Warner Losh" Cc: blauwirbel@gmail.com, qemu-devel@nongnu.org On Thu, Apr 23, 2009 at 02:07:35PM -0600, M. Warner Losh wrote: > No. My fix was the correct one. :) Well certainly not. You changed 3 characters where 1 character would have solved the problem, and not messed with the intent of the original programmer for no good reason. > In the absence of other side effects, yes. There are no side effects, hence it is better. > It isn't the safest order. It is safer for one class of expressions, > more dangerous for the others. It is safer for the one that is generally much worse to get wrong (assignment versus comparison). It is arguable less safe for some people who can only thing in words rather than logic for greater than and less than comparisons. > I've also never seen that requirement in any of the works that I've > done, which has had safety implications... Well there are certainly some places that shouldn't be doing such things. Of course one could also argue that C shouldn't be permitted for such type of work. It simply permits too much sloppy code. -- Len Sorensen