projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
916e89e
)
tools:iio:iio_utils: refactor assignment of is_signed
author
Hartmut Knaack
<knaack.h@gmx.de>
Sun, 31 May 2015 12:40:19 +0000
(14:40 +0200)
committer
Jonathan Cameron
<jic23@kernel.org>
Mon, 1 Jun 2015 07:35:29 +0000
(08:35 +0100)
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>
tools/iio/iio_utils.c
patch
|
blob
|
blame
|
history
diff --git
a/tools/iio/iio_utils.c
b/tools/iio/iio_utils.c
index 0524725279bb3d675f33049758fc2c4bf921a917..c83f4dfe71d64b5aabec82eea2612c3cc50aa1c9 100644
(file)
--- 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);