iio: Accept a leading '+' sign when parsing fixed point numbers
If we encounter a leading '+' sign just skip over it. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This commit is contained in:
Родитель
02330acda7
Коммит
ef4f92c064
|
@ -437,6 +437,8 @@ static ssize_t iio_write_channel_info(struct device *dev,
|
|||
if (buf[0] == '-') {
|
||||
negative = true;
|
||||
buf++;
|
||||
} else if (buf[0] == '+') {
|
||||
buf++;
|
||||
}
|
||||
|
||||
while (*buf) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче