From: Takashi Sakamoto Date: Tue, 15 Mar 2022 23:30:07 +0000 (+0900) Subject: ctl: fix misfunction of alsactl_get_card_id_list() X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=refs%2Fheads%2Ftopic%2Ffix-v0.2.1;p=alsa-gobject.git ctl: fix misfunction of alsactl_get_card_id_list() Even if instantiation of libudev enumerator is successful, alsactl_get_card_id_list() handles the success as failure. As a result, the function does not work at all. This commit fixes the bug. Fixes: bfe4b0589fc6 ("ctl/hwdep/rawmidi: fix uninitialized warning") Signed-off-by: Takashi Sakamoto --- diff --git a/src/ctl/query.c b/src/ctl/query.c index cfaef2a..1430643 100644 --- a/src/ctl/query.c +++ b/src/ctl/query.c @@ -128,7 +128,7 @@ void alsactl_get_card_id_list(guint **entries, gsize *entry_count, g_return_if_fail(error == NULL || *error == NULL); prepare_udev_enum(&enumerator, error); - if (*error == NULL) + if (*error != NULL) return; entry_list = udev_enumerate_get_list_entry(enumerator);