FD_SET: dump NULL-check that hides usage error, dump non-standard FD_SET_VAL
This commit is contained in:
@@ -1337,19 +1337,19 @@ lwip_selscan(int maxfdp1, fd_set *readset_in, fd_set *writeset_in, fd_set *excep
|
||||
/* ... then examine it: */
|
||||
/* See if netconn of this socket is ready for read */
|
||||
if (readset_in && FD_ISSET(i, readset_in) && ((lastdata != NULL) || (rcvevent > 0))) {
|
||||
FD_SET_VAL(i, lreadset);
|
||||
FD_SET(i, &lreadset);
|
||||
LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_selscan: fd=%d ready for reading\n", i));
|
||||
nready++;
|
||||
}
|
||||
/* See if netconn of this socket is ready for write */
|
||||
if (writeset_in && FD_ISSET(i, writeset_in) && (sendevent != 0)) {
|
||||
FD_SET_VAL(i, lwriteset);
|
||||
FD_SET(i, &lwriteset);
|
||||
LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_selscan: fd=%d ready for writing\n", i));
|
||||
nready++;
|
||||
}
|
||||
/* See if netconn of this socket had an error */
|
||||
if (exceptset_in && FD_ISSET(i, exceptset_in) && (errevent != 0)) {
|
||||
FD_SET_VAL(i, lexceptset);
|
||||
FD_SET(i, &lexceptset);
|
||||
LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_selscan: fd=%d ready for exception\n", i));
|
||||
nready++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user