summaryrefslogtreecommitdiff
path: root/drivers/iio/temperature
diff options
context:
space:
mode:
authorMatti Vaittinen <mazziesaccount@gmail.com>2022-10-13 15:04:04 +0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2022-10-17 10:51:26 +0300
commit72b2aa38191bcba28389b0e20bf6b4f15017ff2b (patch)
tree2b5236d39a7a3c0741efe62bd1d08ad174dd05ae /drivers/iio/temperature
parent174dac5dc800e4e2e4552baf6340846a344d01a3 (diff)
downloadlinux-72b2aa38191bcba28389b0e20bf6b4f15017ff2b.tar.xz
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: 096f9b862e60 ("tools:iio:iio_utils: implement digit calculation") Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com> Link: https://lore.kernel.org/r/Y0f+tKCz+ZAIoroQ@dc75zzyyyyyyyyyyyyycy-3.rev.dnainternet.fi Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/temperature')
0 files changed, 0 insertions, 0 deletions