mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-04 13:30:08 -05:00
conf: return count of items in snd_config_is_array()
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
3fd1de5cbe
commit
e3edbf6e3b
1 changed files with 4 additions and 3 deletions
|
|
@ -1812,9 +1812,10 @@ static int check_array_item(const char *id, int index)
|
|||
}
|
||||
|
||||
/**
|
||||
* \brief Returns if the compound is an array.
|
||||
* \brief Returns if the compound is an array (and count of items).
|
||||
* \param config Handle to the configuration node.
|
||||
* \return A positive value when true, zero when false, otherwise a negative error code.
|
||||
* \return A count of items in array, zero when the compound is not an array,
|
||||
* otherwise a negative error code.
|
||||
*/
|
||||
int snd_config_is_array(const snd_config_t *config)
|
||||
{
|
||||
|
|
@ -1832,7 +1833,7 @@ int snd_config_is_array(const snd_config_t *config)
|
|||
return 0;
|
||||
idx++;
|
||||
}
|
||||
return 1;
|
||||
return idx;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue