aboutsummaryrefslogtreecommitdiff
path: root/tools/iio
diff options
context:
space:
mode:
authorHartmut Knaack2015-05-31 14:39:56 +0200
committerJonathan Cameron2015-05-31 17:35:04 +0100
commit8749948a1bc0aff24e493f89de40e2ff95a83baf (patch)
tree1587001a6bda3f0454323621215f2eb03e3ca8df /tools/iio
parent5fdb8c6127c3c594360fb5f2959a724809c0032e (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/iio')
-rw-r--r--tools/iio/generic_buffer.c2
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