> (1L<< 16) + 8L*BITS(int),
1. (int) looks like it should be a cast, but casts prefix the expression, not postfix them
So perhaps
(1L<< 16) + 8L*(int)BITS,
2. The first parameter is supposed to be the number of fds to check, but this is one massive number - (1<<16) is like over 65000.
Does your 'fds' structure have this many entries?
To me, BITS looks like a macro should probably be defined as:
Code:
#define BITS(type) (sizeof(type) * 8)
However, that doesn't look like something appropriate to put in the first value of a select() call. You're supposed to put the maximum fd in any of the FD_SETs you pass to it, plus one.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.