From: Hartmut Knaack Date: Sun, 31 May 2015 12:40:19 +0000 (+0200) Subject: tools:iio:iio_utils: refactor assignment of is_signed X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=33ebcb21a67f257faf1128f08a6d7c0299cb0da2;p=linux-beck.git 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 Signed-off-by: Jonathan Cameron --- 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);