Hi, I just began reading the code of HAproxy.

I am confused a bit with the operations about fd_evts. The comment says:

/* Each 32-bit word contains 2-bit descriptors of the latest state for 16
FDs :
 *   desc = (u32 >> (2*fd)) & 3

Should that actually be
     desc = (u32 >> FD2BIT(fd)) & 3

(2*fd) may be larger than 32.


robin

Reply via email to