From: Timo Kokkonen Date: Mon, 7 Oct 2013 18:05:40 +0000 (+0300) Subject: Fix another incorrect test against read() return value X-Git-Url: http://git.itanic.dy.fi/?p=log-plotter;a=commitdiff_plain;h=7392d1212f17b998364f8499ce8c6e0fb65fbb5a Fix another incorrect test against read() return value Signed-off-by: Timo Kokkonen --- diff --git a/main.c b/main.c index 388f63e..776f81e 100644 --- a/main.c +++ b/main.c @@ -121,7 +121,7 @@ static int read_data(int infd, int outfd) "%ld;%s\n", cur_time - start_time, buf); ret = write(outfd, str, len); - if (read < 0) { + if (ret < 0) { pr_err("write: %m\n"); break; }