On Thu, 9 Jul 2009, Ulrich Windl wrote:

> On 6 Jul 2009 at 8:19, Charlie Brady wrote:
>
>>      return n1 != n2 && ((n1 < n2 && (n2 - n1 < SNA32_CHECK)) ||
>>                          (n1 > n2 && (n1 - n2 > SNA32_CHECK)));
>>
>> is equivalent to
>>
>>      return              ((n1 < n2 && (n2 - n1 < SNA32_CHECK)) ||
>>                          (n1 > n2 && (n1 - n2 > SNA32_CHECK)));
>>
>> Both are false if n1 == n2.
>
> Maybe it's because of the short-cut evaluation that wants to optimize the 
> case "n1
> == n2", but I don't know.

What is your point?

My point is that it would achieve nothing to change:

       return              ((n1 < n2 && (n2 - n1 < SNA32_CHECK)) ||
                           (n1 > n2 && (n1 - n2 > SNA32_CHECK)));
to:

       return  n1 != n2 && ((n1 < n2 && (n2 - n1 < SNA32_CHECK)) ||
                           (n1 > n2 && (n1 - n2 > SNA32_CHECK)));

and that it is not a bug to say:

       return              ((n1 < n2 && (n2 - n1 < SNA32_CHECK)) ||
                           (n1 > n2 && (n1 - n2 > SNA32_CHECK)));

when you mean:

       return  n1 != n2 && ((n1 < n2 && (n2 - n1 < SNA32_CHECK)) ||
                           (n1 > n2 && (n1 - n2 > SNA32_CHECK)));


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~----------~----~----~----~------~----~------~--~---

Reply via email to