diff options
author | Hartmut Knaack | 2015-05-31 14:40:19 +0200 |
---|---|---|
committer | Jonathan Cameron | 2015-06-01 08:35:29 +0100 |
commit | 33ebcb21a67f257faf1128f08a6d7c0299cb0da2 (patch) | |
tree | 4f781e6e3efd54bfa19d026d968f92e86a32a951 /tools/iio | |
parent | 916e89e4b7272e1eda9eba057cf25197129bcf79 (diff) |
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>
Diffstat (limited to 'tools/iio')
-rw-r--r-- | tools/iio/iio_utils.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/tools/iio/iio_utils.c b/tools/iio/iio_utils.c index 0524725279bb..c83f4dfe71d6 100644 --- a/tools/iio/iio_utils.c +++ b/tools/iio/iio_utils.c @@ -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); |