Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8749948a authored by Hartmut Knaack's avatar Hartmut Knaack Committed by Jonathan Cameron
Browse files

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: default avatarHartmut Knaack <knaack.h@gmx.de>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent 5fdb8c61
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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