]> git.alsa-project.org Git - alsa-lib.git/commit
topology: use snd_config_get_llong() in tplg_get_integer/unsigned()
authorJaroslav Kysela <perex@perex.cz>
Fri, 31 Jul 2026 09:37:55 +0000 (11:37 +0200)
committerJaroslav Kysela <perex@perex.cz>
Fri, 31 Jul 2026 10:26:29 +0000 (12:26 +0200)
commit1453c68fa47f56db250b775acde6954d3ca60aa6
tree5c88a6fea6b29f8493554c49cf8a664568006126
parent14eafbfb8ba5f803ae378e234936dac9a48ed9a4
topology: use snd_config_get_llong() in tplg_get_integer/unsigned()

Replace the per-type INTEGER/INTEGER64/STRING parsing in both
functions with the new snd_config_get_llong() helper.

In tplg_get_unsigned(), the string path now goes through
safe_strtoll_base() instead of strtoul(); a negative value still
wraps to the same unsigned result via the existing wraparound check,
and values within the UINT_MAX range never overflow long long.

In tplg_get_integer(), INTEGER64 config nodes are now also accepted
(previously rejected), subject to the same INT_MIN/INT_MAX range
check as before.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
src/topology/parser.c