On Mon, 6 Jul 2009, Hannes Reinecke wrote:

> Do I read that correctly and shouldn't our code actually read:
>
>       return n1 != n2 && ((n1 < n2 && (n2 - n1 < SNA32_CHECK)) ||
>                           (n1 > n2 && (n1 - n2 > SNA32_CHECK)));
>
> ?
>
> Otherwise we'd be off by one, or am I missing something here?

        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.

--~--~---------~--~----~------------~-------~--~----~
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