Fix device name listing with card = -1

Fixed the device name listing with card = -1, such as
aplay -L.
This commit is contained in:
Takashi Iwai 2006-11-06 17:37:15 +01:00
parent 9df5c28f55
commit 10e3360575

View file

@ -527,8 +527,7 @@ int snd_device_name_hint(int card, const char *iface, char ***hints)
if (card >= 0) { if (card >= 0) {
err = add_card(&list, card); err = add_card(&list, card);
} else { } else {
err = get_card_name(&list, card); err = snd_card_next(&card);
err = err >= 0 ? snd_card_next(&card) : err;
if (err < 0) if (err < 0)
goto __error; goto __error;
while (card >= 0) { while (card >= 0) {