snd_mixer_poll_descriptors_revents should loop over pollfd

Signed-off-by: Sander Jansen <s.jansen@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Sander Jansen 2013-02-25 10:41:40 -06:00 committed by Takashi Iwai
parent f5f45589f8
commit 28493d9d69

View file

@ -743,7 +743,7 @@ int snd_mixer_poll_descriptors_revents(snd_mixer_t *mixer, struct pollfd *pfds,
if (nfds == 0) if (nfds == 0)
return -EINVAL; return -EINVAL;
res = 0; res = 0;
for (idx = 0; idx < nfds; idx++) for (idx = 0; idx < nfds; idx++, pfds++)
res |= pfds->revents & (POLLIN|POLLERR|POLLNVAL); res |= pfds->revents & (POLLIN|POLLERR|POLLNVAL);
*revents = res; *revents = res;
return 0; return 0;