X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fdaemon%2Futils_tail.c;h=0d8ed7c177fcb2aa12e1c7cf9d9dc3fb88108a50;hb=474d70e02d04de92aa7503b3887989729bbbff02;hp=0b0a8fb41ce9a1064d3d4b27cc9f37c34000e82a;hpb=ff9e11ade5cfabf32c63fb19fc76cbbc4186bc5b;p=collectd.git diff --git a/src/daemon/utils_tail.c b/src/daemon/utils_tail.c index 0b0a8fb4..0d8ed7c1 100644 --- a/src/daemon/utils_tail.c +++ b/src/daemon/utils_tail.c @@ -31,6 +31,7 @@ **/ #include "collectd.h" + #include "common.h" #include "utils_tail.h" @@ -45,10 +46,9 @@ static int cu_tail_reopen (cu_tail_t *obj) { int seek_end = 0; FILE *fh; - struct stat stat_buf; + struct stat stat_buf = { 0 }; int status; - memset (&stat_buf, 0, sizeof (stat_buf)); status = stat (obj->file, &stat_buf); if (status != 0) {