diff options
author | Tobias Klauser <tklauser@xenon.tklauser.home> | 2006-05-25 19:42:29 +0200 |
---|---|---|
committer | Tobias Klauser <tklauser@xenon.tklauser.home> | 2006-05-25 19:42:29 +0200 |
commit | 0d393b60b398397b91303163b22544135df891d1 (patch) | |
tree | 1a1c0d7b962e338523cfb4d66ad9e7daf8355abd | |
parent | 122f6162183ea0ea107d1a6007509ecaa32fed0f (diff) |
memset() fbuf before using
-rw-r--r-- | inotail.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); } |