提交 8749948a 编写于 作者: H Hartmut Knaack 提交者: Jonathan Cameron

tools:iio:generic_buffer: fix check of errno

Since errno contains the value of any of the defined error names, a
negation will not lead to the desired match.
Signed-off-by: NHartmut Knaack <knaack.h@gmx.de>
Signed-off-by: NJonathan Cameron <jic23@kernel.org>
上级 5fdb8c61
......@@ -321,7 +321,7 @@ int main(int argc, char **argv)
data,
toread*scan_size);
if (read_size < 0) {
if (errno == -EAGAIN) {
if (errno == EAGAIN) {
printf("nothing available\n");
continue;
} else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册