From: Jaroslav Kysela Date: Tue, 3 Nov 2009 15:36:55 +0000 (+0100) Subject: namehint: add missing list->card initialization X-Git-Tag: v1.0.22~13 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=592bd1e98b4e16324b2d6f5b36683e1be08e0d38;p=alsa-lib.git namehint: add missing list->card initialization list->card is wrongly assumed to be initialized, but the previous initialization is within a conditional that is false when only card-independent devices are found. (This is the case when searching for mixers on my system; the end result is that the "pulse" mixer is listed three times.) Signed-off-by: John Lindgren Signed-off-by: Jaroslav Kysela --- diff --git a/src/control/namehint.c b/src/control/namehint.c index a134ed7e..1d3f4be9 100644 --- a/src/control/namehint.c +++ b/src/control/namehint.c @@ -453,6 +453,7 @@ static int add_card(struct hint_list *list, int card) if (err == -EXDEV) continue; if (err < 0) { + list->card = card; list->device = -1; err = try_config(list, list->siface, str); }