diff options
author | Hartmut Knaack <knaack.h@gmx.de> | 2015-05-31 14:39:56 +0200 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2015-05-31 17:35:04 +0100 |
commit | 8749948a1bc0aff24e493f89de40e2ff95a83baf (patch) | |
tree | 1587001a6bda3f0454323621215f2eb03e3ca8df /tools | |
parent | 5fdb8c6127c3c594360fb5f2959a724809c0032e (diff) |
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: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/iio/generic_buffer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/iio/generic_buffer.c b/tools/iio/generic_buffer.c index 7635aeb93dc8..e01c80ec5a88 100644 --- a/tools/iio/generic_buffer.c +++ b/tools/iio/generic_buffer.c @@ -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 |