From: Jaroslav Kysela Date: Wed, 11 Oct 2006 11:59:42 +0000 (+0200) Subject: fix two issues in snd_device_name_hint() X-Git-Tag: v1.0.14rc1~23 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=faf8aad99ad066d59c7599bfb272d1fb1943748b;p=alsa-lib.git fix two issues in snd_device_name_hint() - returned wrong error when the namehint section does not exist - variable underflow for the rawmidi interface --- diff --git a/src/control/namehint.c b/src/control/namehint.c index e787b9df..4e5b0b01 100644 --- a/src/control/namehint.c +++ b/src/control/namehint.c @@ -425,7 +425,7 @@ static int add_card(struct hint_list *list, int card, snd_ctl_elem_iface_t iface int snd_device_name_hint(int card, snd_ctl_elem_iface_t iface, char ***hints) { struct hint_list list; - char ehints[16]; + char ehints[24]; const char *str; snd_config_t *conf; snd_config_iterator_t i, next; @@ -466,6 +466,7 @@ int snd_device_name_hint(int card, snd_ctl_elem_iface_t iface, char ***hints) goto __error; } } + err = 0; __error: if (err < 0) { snd_device_name_free_hint(list.list);