tools:iio:iio_utils: refactor assignment of is_signed

Change the assignment of *is_signed in iioutils_get_type() to a one-liner,
as already done with *be.

Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This commit is contained in:
Hartmut Knaack 2015-05-31 14:40:19 +02:00 committed by Jonathan Cameron
parent 916e89e4b7
commit 33ebcb21a6

View file

@ -168,10 +168,7 @@ int iioutils_get_type(unsigned *is_signed,
*mask = ~0;
else
*mask = (1 << *bits_used) - 1;
if (signchar == 's')
*is_signed = 1;
else
*is_signed = 0;
*is_signed = (signchar == 's');
if (fclose(sysfsfp)) {
ret = -errno;
printf("Failed to close %s\n", filename);