]> git.itanic.dy.fi Git - log-plotter/commitdiff
Add missing initialization
authorTimo Kokkonen <timo.t.kokkonen@iki.fi>
Mon, 7 Oct 2013 18:23:43 +0000 (21:23 +0300)
committerTimo Kokkonen <timo.t.kokkonen@iki.fi>
Mon, 7 Oct 2013 18:23:43 +0000 (21:23 +0300)
We are passing on the variable to read_log_line() function and it
needs to be initialized properly prior the first use.

Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>
main.c

diff --git a/main.c b/main.c
index e017fadc92fa7f8ad835e02d0aeefd36143c6c0e..4832e6a12063e85555091d4e37ee4a0d1b369246 100644 (file)
--- a/main.c
+++ b/main.c
@@ -72,7 +72,7 @@ static int read_data(int infd, int outfd)
        int epoll_fd;
        int ret;
        char buf[256];
-       int offset;
+       int offset = 0;
 
        epoll_fd = epoll_create(1);
        if (epoll_fd < 0) {