diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-08 03:43:39 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-08 03:43:39 +0000 |
commit | 27a2c36c9538c7e5536a1b20fd74f0fc911d7950 (patch) | |
tree | 3101221cb1458bce62f7ae76638517d93f8b64a8 /tools/iio/iio_utils.c | |
parent | Releasing progress-linux version 4.19.260-1progress5u1. (diff) | |
download | linux-27a2c36c9538c7e5536a1b20fd74f0fc911d7950.tar.xz linux-27a2c36c9538c7e5536a1b20fd74f0fc911d7950.zip |
Merging upstream version 4.19.269.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tools/iio/iio_utils.c')
-rw-r--r-- | tools/iio/iio_utils.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/iio/iio_utils.c b/tools/iio/iio_utils.c index 55272fef3..d60a25257 100644 --- a/tools/iio/iio_utils.c +++ b/tools/iio/iio_utils.c @@ -546,6 +546,10 @@ static int calc_digits(int num) { int count = 0; + /* It takes a digit to represent zero */ + if (!num) + return 1; + while (num != 0) { num /= 10; count++; |