]> git.itanic.dy.fi Git - log-plotter/commitdiff
Fix another incorrect test against read() return value
authorTimo Kokkonen <timo.t.kokkonen@iki.fi>
Mon, 7 Oct 2013 18:05:40 +0000 (21:05 +0300)
committerTimo Kokkonen <timo.t.kokkonen@iki.fi>
Mon, 7 Oct 2013 18:05:40 +0000 (21:05 +0300)
Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>
main.c

diff --git a/main.c b/main.c
index 388f63e0bfdba2a7eb3655182a284d9f17fc75a2..776f81ee5036bb054f3ff6e732ac9c6d93ecd86e 100644 (file)
--- 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;
                }