summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaroslav Kysela <perex@perex.cz>2006-10-11 13:59:42 +0200
committerJaroslav Kysela <perex@perex.cz>2006-10-11 13:59:42 +0200
commitfaf8aad99ad066d59c7599bfb272d1fb1943748b (patch)
tree816f8d64b169b160f5aefbe2d4017ea57868c4ef
parent13fdc417851d87cce7303df65784df7b940ae56a (diff)
downloadalsa-lib-faf8aad99ad066d59c7599bfb272d1fb1943748b.tar.gz
fix two issues in snd_device_name_hint()
- returned wrong error when the namehint section does not exist - variable underflow for the rawmidi interface
-rw-r--r--src/control/namehint.c3
1 files changed, 2 insertions, 1 deletions
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);