> > > +      if (unlikely(n < 1))
 > > > +         break;
 > > >
 > > >        for (i = 0; i < n; i++) {
 > > >           struct ib_wc *wc = priv->ibwc + i;
 > 
 > > The 'for' loop (followed by the "if (n != t) break" check)
 > > should take care of this, isn't it?
 > 
 > Oh you're saying that since this is signed arithmetic we should never
 > enter the for loop. I saw a problem when I worked on some patch and that
 > seemed to solve the problem...

What does signed arithmetic have to do with anything?  I don't see how
your patch changes the behavior at all: if the condition (n < 1) ever
tests as true then the for loop cannot be entered, and since t is
always at least 1, the condition (n != t) will be true and we'll break
out of the while loop anyway.

 - R.
_______________________________________________
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