Commit 33ebcb21 authored by Hartmut Knaack's avatar Hartmut Knaack Committed by Jonathan Cameron

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: default avatarHartmut Knaack <knaack.h@gmx.de>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent 916e89e4
...@@ -168,10 +168,7 @@ int iioutils_get_type(unsigned *is_signed, ...@@ -168,10 +168,7 @@ int iioutils_get_type(unsigned *is_signed,
*mask = ~0; *mask = ~0;
else else
*mask = (1 << *bits_used) - 1; *mask = (1 << *bits_used) - 1;
if (signchar == 's') *is_signed = (signchar == 's');
*is_signed = 1;
else
*is_signed = 0;
if (fclose(sysfsfp)) { if (fclose(sysfsfp)) {
ret = -errno; ret = -errno;
printf("Failed to close %s\n", filename); printf("Failed to close %s\n", filename);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment