[ofa-general] RE: [PATCH] rdma_cm: fix port type (fix bug 557)

Sean Hefty mshefty at ichips.intel.com
Mon Jun 4 12:37:39 PDT 2007


> 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



More information about the general mailing list