mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-18 14:25:25 +00:00
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>
This commit is contained in:
parent
5fdb8c6127
commit
8749948a1b
@ -321,7 +321,7 @@ int main(int argc, char **argv)
|
|||||||
data,
|
data,
|
||||||
toread*scan_size);
|
toread*scan_size);
|
||||||
if (read_size < 0) {
|
if (read_size < 0) {
|
||||||
if (errno == -EAGAIN) {
|
if (errno == EAGAIN) {
|
||||||
printf("nothing available\n");
|
printf("nothing available\n");
|
||||||
continue;
|
continue;
|
||||||
} else
|
} else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user