提交 33ebcb21 编写于 作者: H Hartmut Knaack 提交者: Jonathan Cameron

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: NHartmut Knaack <knaack.h@gmx.de>
Signed-off-by: NJonathan Cameron <jic23@kernel.org>
上级 916e89e4
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册