summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/iio/iio_utils.c5
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);