topology: Use bool parser to parse boolean value
PATCH 1/1 topology: Use bool parser to parse boolean value
It should be safe to change this as correct values with int would be 0 or 1 and bool parser handles them correctly.
Signed-off-by Amadeusz Sławiński <[email protected]>
--- src/topology/dapm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
src/topology/dapm.c +2 -1
@@ -595,7 +595,8 @@ int tplg_parse_dapm_widget(snd_tplg_t *tplg, }if (strcmp (id,"invert" ) ==0 ) { -if (tplg_get_integer (n, &ival,0 )) + ival =snd_config_get_bool (n); +if (ival <0 )return -EINVAL ; widget->invert = ival;
Signature · 1 line
2.17.1
Dne 17. 04. 20 v 18:47 Amadeusz Sławiński napsal(a):
Quoted 4 lines
It should be safe to change this as correct values with int would be 0 or 1 and bool parser handles them correctly.
Signed-off-by Amadeusz Sławiński <[email protected]>
Applied thanks.
Jaroslav
Signature · 2 lines
Jaroslav Kysela <[email protected]> Linux Sound Maintainer; ALSA Project; Red Hat, Inc.