tools:iio:iio_utils: implement digit calculation
authorHartmut Knaack <knaack.h@gmx.de>
Sun, 31 May 2015 12:40:00 +0000 (14:40 +0200)
committerJonathan Cameron <jic23@kernel.org>
Sun, 31 May 2015 18:18:55 +0000 (19:18 +0100)
Previously, the return value of sscanf() was treated as an indication of
the digits it would have read. Yet, sscanf() only returns the amount of
valid matches.
Therefore, introduce a function to calculate the decimal digits of the
read number and use this one to commence a colon search, as originally
intended.

Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
tools/iio/iio_utils.c

Simple merge