From 0d393b60b398397b91303163b22544135df891d1 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Thu, 25 May 2006 19:42:29 +0200 Subject: memset() fbuf before using --- inotail.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inotail.c') diff --git a/inotail.c b/inotail.c index 0c076be..53cbec1 100644 --- a/inotail.c +++ b/inotail.c @@ -211,12 +211,12 @@ static int watch_files(struct file_struct *f, int n_files) if (verbose) write_header(fil->name); + memset(&fbuf, 0, sizeof(fbuf)); lseek(ffd, offset, SEEK_SET); while (read(ffd, &fbuf, block_size) != 0) { write(STDOUT_FILENO, fbuf, block_size); } - close(ffd); } -- cgit v1.2.3-54-g00ecf