]> git.ipfire.org Git - thirdparty/iproute2.git/commit
utils: fix get_integer() logic
authorPedro Tammela <pctammela@mojatatu.com>
Sat, 19 Aug 2023 20:54:48 +0000 (17:54 -0300)
committerDavid Ahern <dsahern@kernel.org>
Sun, 20 Aug 2023 16:41:05 +0000 (10:41 -0600)
commit877f8149d2ed94b6ab412fabaab9fe8d15193db7
tree54746a28472379fb00cd4b36feb015950c607f15
parente12d0c929cf5f4266f745063696dd291cb6f06a4
utils: fix get_integer() logic

After 3a463c15, get_integer() doesn't return the converted value and
always writes 0 in 'val' in case of success.
Fix the logic so it writes the converted value in 'val'.

Fixes: 3a463c15 ("Add get_long utility and adapt get_integer accordingly"
Signed-off-by: Pedro Tammela <pctammela@mojatatu.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
lib/utils.c