Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tools: iio: iio_utils: fix digit calculation
The iio_utils uses a digit calculation in order to know length of the file name containing a buffer number. The digit calculation does not work for number 0. This leads to allocation of one character too small buffer for the file-name when file name contains value '0'. (Eg. buffer0). Fix digit calculation by returning one digit to be present for number '0'. Fixes: 096f9b8 ("tools:iio:iio_utils: implement digit calculation") Signed-off-by: Matti Vaittinen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Cc: <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
- Loading branch information