diff options
author | Hartmut Knaack <knaack.h@gmx.de> | 2015-05-31 08:40:19 -0400 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2015-06-01 03:35:29 -0400 |
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, | |||
168 | *mask = ~0; | 168 | *mask = ~0; |
169 | else | 169 | else |
170 | *mask = (1 << *bits_used) - 1; | 170 | *mask = (1 << *bits_used) - 1; |
171 | if (signchar == 's') | 171 | *is_signed = (signchar == 's'); |
172 | *is_signed = 1; | ||
173 | else | ||
174 | *is_signed = 0; | ||
175 | if (fclose(sysfsfp)) { | 172 | if (fclose(sysfsfp)) { |
176 | ret = -errno; | 173 | ret = -errno; |
177 | printf("Failed to close %s\n", filename); | 174 | printf("Failed to close %s\n", filename); |