>> Even if next_port is initialized to a negative value by get_random_bytes, I
>> would expect next_port to be set to a positive value between 
>> local_port_range[0]
>> and local_port_range[1] by the next statement.  I'm not seeing the error my 
>> my
>> math/logic here.
>
>My my English needs help, but here's the definitions for '%' in C89 and 
>C99 according to Wikipedia:
>
>C89 - sign of result is not defined
>C99 - result has same sign as dividend
>
>Could the compiler be causing the difference on this?
>
>- Sean
>
Possible. I was using the OFED build environment in sles10sp1, and without the 
patch next_port sometimes gets a negative value. This might be the reason it was
difficult to reproduce this. Anyway, in order to cover all possibilities (such 
as C99), I think that next_port should be unsigned.

--Yossi
_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to