Re: [ovs-dev] [PATCH] netdev-linux: Avoid "cleverness" in swap_uint64().

2011-04-11 Thread Ben Pfaff
Thanks, I pushed this one. On Sun, Apr 10, 2011 at 11:17:39PM -0700, Justin Pettit wrote: > Looks good to me. > > --Justin > > > On Apr 8, 2011, at 4:45 PM, Ben Pfaff wrote: > > > Obviously correct code is easier on everyone. As the C FAQ says: ___

Re: [ovs-dev] [PATCH] netdev-linux: Avoid "cleverness" in swap_uint64().

2011-04-10 Thread Justin Pettit
Looks good to me. --Justin On Apr 8, 2011, at 4:45 PM, Ben Pfaff wrote: > Obviously correct code is easier on everyone. As the C FAQ says: > > 20.15c: How can I swap two values without using a temporary? > > A:The standard hoary old assembly language programmer's trick is: > >

[ovs-dev] [PATCH] netdev-linux: Avoid "cleverness" in swap_uint64().

2011-04-08 Thread Ben Pfaff
Obviously correct code is easier on everyone. As the C FAQ says: 20.15c: How can I swap two values without using a temporary? A: The standard hoary old assembly language programmer's trick is: a ^= b; b ^= a; a ^= b; But this sort of