[alsa-devel] [PATCH - alsa-lib/mixer 1/1] snd_mixer_poll_descriptors_revents should loop over pollfd

Takashi Iwai tiwai at suse.de
Tue Feb 26 10:08:36 CET 2013


At Mon, 25 Feb 2013 10:41:40 -0600,
s.jansen at gmail.com wrote:
> 
> From: Sander Jansen <s.jansen at gmail.com>
> 
> 
> Signed-off-by: Sander Jansen <s.jansen at gmail.com>

Thanks, applied now.


Takashi

> 
> diff --git a/src/mixer/mixer.c b/src/mixer/mixer.c
> index 85d843f..8deceac 100644
> --- a/src/mixer/mixer.c
> +++ b/src/mixer/mixer.c
> @@ -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;
> -- 
> 1.8.1.3
> 
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel at alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
> 


More information about the Alsa-devel mailing list