Changed descriptors_count

This commit is contained in:
Abramo Bagnara 2001-02-18 18:32:31 +00:00
parent 7687662381
commit 536e7b66a5

View file

@ -1461,7 +1461,7 @@ static int
mixer_iteration (void) mixer_iteration (void)
{ {
struct timeval delay = { 0, 0 }; struct timeval delay = { 0, 0 };
unsigned int count; int count;
struct pollfd *fds; struct pollfd *fds;
int err; int err;
int finished = 0; int finished = 0;
@ -1469,8 +1469,8 @@ mixer_iteration (void)
int old_view; int old_view;
/* setup for select on stdin and the mixer fd */ /* setup for select on stdin and the mixer fd */
if ((err = snd_mixer_poll_descriptors_count(mixer_handle, &count)) < 0) if ((count = snd_mixer_poll_descriptors_count(mixer_handle)) < 0)
mixer_abort (ERR_FCN, "snd_mixer_poll_descriptors_count", err); mixer_abort (ERR_FCN, "snd_mixer_poll_descriptors_count", count);
fds = calloc(count + 1, sizeof(struct pollfd)); fds = calloc(count + 1, sizeof(struct pollfd));
if (fds == NULL) if (fds == NULL)
mixer_abort (ERR_FCN, "malloc", 0); mixer_abort (ERR_FCN, "malloc", 0);