[openib-general] integer overflow

Roland Dreier rdreier at cisco.com
Sat Feb 10 15:52:45 PST 2007


 > 	while ((int) priv->tx_tail - (int) priv->tx_head < 0) {
 > 
 > seems to rely on integer overflow which seems to be
 > undefined behaviour.

tx_tail and tx_head are unsigned, and overflow is defined for unsigned
integers.

 - R.




More information about the general mailing list