[openib-general] Re: sdp: 0 > result

Libor Michalek libor at topspin.com
Fri Feb 25 11:58:57 PST 2005


On Thu, Feb 24, 2005 at 11:49:28PM +0200, Michael S. Tsirkin wrote:
> OK, now what about things like these:
> 
>         if (0 > result) {
> 
> may I change them all to
> 
>         if (result < 0) {
> 
> While being equivalent, we are testing the result, not 0.
> 
> Similiarly (although I feel somewhat less strongly about it)
> 
>         if (0 == result)
> and
>         if (NULL == conn)
> 
> are better off as
> 
> 	if (!result) {
> and
>         if (!conn)
> 
> C is a Spartan language, and this is more brief.
> Libor, I think I asked about the second one, but dont recall you
> answering.
> If OK to both, let me know and I'll do it on Sunday.

  I actually feel more strongly in favour of making the second change
you propose then the first. However, I'm OK with both, so feel free
to submit a patch.

-Libor



More information about the general mailing list