commit | 096f9b862e605fe08bb30e4f7a381684a8ff82ed | [log] [tgz] |
---|---|---|
author | Hartmut Knaack <knaack.h@gmx.de> | Sun May 31 14:40:00 2015 +0200 |
committer | Jonathan Cameron <jic23@kernel.org> | Sun May 31 19:18:55 2015 +0100 |
tree | c8c8c7cc31ea17fce97564b2768e1a847dc19485 | |
parent | dc8b5d6e633f8e54f70594d0be87aaf401ea0559 [diff] |
tools:iio:iio_utils: implement digit calculation 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>