projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5fdb8c6
)
tools:iio:generic_buffer: fix check of errno
author
Hartmut Knaack
<knaack.h@gmx.de>
Sun, 31 May 2015 12:39:56 +0000
(14:39 +0200)
committer
Jonathan Cameron
<jic23@kernel.org>
Sun, 31 May 2015 16:35:04 +0000
(17:35 +0100)
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>
tools/iio/generic_buffer.c
patch
|
blob
|
blame
|
history
diff --git
a/tools/iio/generic_buffer.c
b/tools/iio/generic_buffer.c
index 7635aeb93dc884c995c3f5154fefb48702e883e7..e01c80ec5a88b8b2d3b29e8fa5a2a869fdabbbd6 100644
(file)
--- 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