devd: don't pass &fds in useless parameters to select(2)
select(2) should be declared as restrict. In addition the only fd in the fdset is open O_RDONLY, and it's not a socket that can provide OOB notifications, Reviewed by: ian, imp, vangyzen
This commit is contained in:
parent
c756fb6ebb
commit
dacbef689d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=329296
@ -1021,7 +1021,7 @@ event_loop(void)
|
|||||||
tv.tv_usec = 0;
|
tv.tv_usec = 0;
|
||||||
FD_ZERO(&fds);
|
FD_ZERO(&fds);
|
||||||
FD_SET(fd, &fds);
|
FD_SET(fd, &fds);
|
||||||
rv = select(fd + 1, &fds, &fds, &fds, &tv);
|
rv = select(fd + 1, &fds, NULL, NULL, &tv);
|
||||||
// No events -> we've processed all pending events
|
// No events -> we've processed all pending events
|
||||||
if (rv == 0) {
|
if (rv == 0) {
|
||||||
devdlog(LOG_DEBUG, "Calling daemon\n");
|
devdlog(LOG_DEBUG, "Calling daemon\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user