**/
#include "collectd.h"
+
#include "common.h"
#include "utils_tail.h"
{
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)
{
{
cu_tail_t *obj;
- obj = (cu_tail_t *) malloc (sizeof (cu_tail_t));
+ obj = calloc (1, sizeof (*obj));
if (obj == NULL)
return (NULL);
- memset (obj, '\0', sizeof (cu_tail_t));
obj->file = strdup (file);
if (obj->file == NULL)