]> git.alsa-project.org Git - alsa-lib.git/commitdiff
snd_mixer_poll_descriptors_revents should loop over pollfd
authorSander Jansen <s.jansen@gmail.com>
Mon, 25 Feb 2013 16:41:40 +0000 (10:41 -0600)
committerTakashi Iwai <tiwai@suse.de>
Tue, 26 Feb 2013 09:08:06 +0000 (10:08 +0100)
Signed-off-by: Sander Jansen <s.jansen@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
src/mixer/mixer.c

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