sndio: fixed poll() call (thanks, kdrakehp!).

Fixes Bugzilla #3705.
This commit is contained in:
Ryan C. Gordon 2017-07-20 20:40:17 -04:00
parent ee9cc32493
commit 8ac17a2ae6
1 changed files with 1 additions and 1 deletions

View File

@ -184,7 +184,7 @@ SNDIO_CaptureFromDevice(_THIS, void *buffer, int buflen)
r = SNDIO_sio_read(this->hidden->dev, buffer, buflen); r = SNDIO_sio_read(this->hidden->dev, buffer, buflen);
while (r == 0 && !SNDIO_sio_eof(this->hidden->dev)) { while (r == 0 && !SNDIO_sio_eof(this->hidden->dev)) {
if ((nfds = SNDIO_sio_pollfd(this->hidden->dev, this->hidden->pfd, POLLIN)) <= 0 if ((nfds = SNDIO_sio_pollfd(this->hidden->dev, this->hidden->pfd, POLLIN)) <= 0
|| poll(this->hidden->pfd, nfds, INFTIM) <= 0) { || poll(this->hidden->pfd, nfds, INFTIM) < 0) {
return -1; return -1;
} }
revents = SNDIO_sio_revents(this->hidden->dev, this->hidden->pfd); revents = SNDIO_sio_revents(this->hidden->dev, this->hidden->pfd);