snd_mixer_poll_descriptors_revents: iterate over all descriptors
PATCH 1/1 snd_mixer_poll_descriptors_revents: iterate over all descriptors
Hello,
Reading the method snd_mixer_poll_descriptors_revents, it seems to me that the iteration over the array 'pfds' is wrong.
Shouldn't the attached patch be applied?
Regards,
Olivier
src/mixer/mixer.c +1 -1
@@ -744,7 +744,7 @@ int snd_mixer_poll_descriptors_revents(snd_mixer_t *mixer, struct pollfd *pfds,return -EINVAL ; res =0 ;for (idx =0 ; idx < nfds; idx++) - res |= pfds->revents & (POLLIN |POLLERR |POLLNVAL ); + res |= pfds[i]->revents & (POLLIN |POLLERR |POLLNVAL ); *revents = res;return 0 ; }
At Thu, 4 Aug 2011 12:06:19 +0200,
Quoted 16 lines · Olivier Trichet
[1 <text/plain; utf-8 (7bit)>]
Hello,Reading the method
snd_mixer_poll_descriptors_revents, it seems to me that the iteration over the array 'pfds' is wrong.
Shouldn't the attached patch be applied?Regards,
Olivier
[2 0001-snd_mixer_poll_descriptors_revents-iterate-over-all-.patch <text/x-patch; utf-8 (quoted-printable)>]src/mixer/mixer.c +0
-0
src/mixer/mixer.c int snd_mixer_poll_descriptors_revents(snd_mixer_t *mixer, struct pollfd *pfds, · line 747
Quoted 5 lines
src/mixer/mixer.c +1
-1@@ -744,7 +744,7 @@ int snd_mixer_poll_descriptors_revents(snd_mixer_t *mixer, struct pollfd *pfds,return -EINVAL ; res =0 ;for (idx =0 ; idx < nfds; idx++) - res |= pfds->revents & (POLLIN |POLLERR |POLLNVAL ); + res |= pfds[i]->revents & (POLLIN |POLLERR |POLLNVAL );
You mean idx instead of i, right?
thanks,
Takashi
Quoted 23 lines · Takashi Iwai
At Thu, 4 Aug 2011 12:06:19 +0200,
Quoted 20 lines · Olivier Trichet
[1 <text/plain; utf-8 (7bit)>]
Hello,Reading the method
snd_mixer_poll_descriptors_revents, it seems to me that the iteration over the array 'pfds' is wrong. Shouldn't the attached patch be applied?Regards,
Olivier
[2 0001-snd_mixer_poll_descriptors_revents-iterate-over-all-.patch <text/x-patch; utf-8 (quoted-printable)>] diff --gita/src/mixer/mixer.cb/src/mixer/mixer.c
index 85d843f..c3269ea 100644src/mixer/mixer.c +0
-0@@ -744,7 +744,7 @@ int snd_mixer_poll_descriptors_revents(snd_mixer_t *mixer, struct pollfd *pfds, return -EINVAL ;
Quoted 8 lines
src/mixer/mixer.c int snd_mixer_poll_descriptors_revents(snd_mixer_t *mixer, struct pollfd *pfds, · line 747
Quoted 5 lines
src/mixer/mixer.c +1
-1res =0 ;for (idx =0 ; idx < nfds; idx++) - res |= pfds->revents & (POLLIN |POLLERR |POLLNVAL ); + res |= pfds[i]->revents & (POLLIN |POLLERR |POLLNVAL );You mean idx instead of i, right?
I even meant pdfs[idx].revents instead of pdfs[i]->revents. Sorry.
Thanks for having a look.
Olivier