[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [7234] Use a more natural order
From: |
Lennart Sorensen |
Subject: |
Re: [Qemu-devel] [7234] Use a more natural order |
Date: |
Thu, 23 Apr 2009 17:01:04 -0400 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
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
- Re: [Qemu-devel] [7234] Use a more natural order, (continued)
- Re: [Qemu-devel] [7234] Use a more natural order, Blue Swirl, 2009/04/23
- Re: [Qemu-devel] [7234] Use a more natural order, Lennart Sorensen, 2009/04/23
- Re: [Qemu-devel] [7234] Use a more natural order, Jamie Lokier, 2009/04/23
- Re: [Qemu-devel] [7234] Use a more natural order, Lennart Sorensen, 2009/04/24
- Re: [Qemu-devel] [7234] Use a more natural order, Nathan Froyd, 2009/04/24
Re: [Qemu-devel] [7234] Use a more natural order, M. Warner Losh, 2009/04/23
Re: [Qemu-devel] [7234] Use a more natural order, Jamie Lokier, 2009/04/23
Re: [Qemu-devel] [7234] Use a more natural order, Jamie Lokier, 2009/04/23
[Qemu-devel] Re: [7234] Use a more natural order, Jan Kiszka, 2009/04/23
Re: [Qemu-devel] [7234] Use a more natural order, Gerd Hoffmann, 2009/04/24