monitor: fix clang warning - Declared variable-length array (VLA) has zero size

This commit is contained in:
Jaroslav Kysela 2014-09-24 10:50:54 +02:00
parent da7a2f91de
commit 17d4a5dd35

View file

@ -91,7 +91,7 @@ int monitor(const char *name)
snd_ctl_t *ctls[MAX_CARDS];
int ncards = 0;
int show_cards;
int i, err;
int i, err = 0;
if (!name) {
int card = -1;
@ -117,7 +117,7 @@ int monitor(const char *name)
show_cards = 0;
}
for (;;) {
for (;ncards > 0;) {
struct pollfd fds[ncards];
for (i = 0; i < ncards; i++)