#include "plugin.h"
#include "configfile.h"
+#include "types_list.h"
static int parse_ds (data_source_t *dsrc, char *buf, size_t buf_len)
{
if (fields[0][0] == '#')
return;
- ds = (data_set_t *) malloc (sizeof (data_set_t));
+ ds = calloc (1, sizeof (*ds));
if (ds == NULL)
return;
- memset (ds, '\0', sizeof (data_set_t));
-
sstrncpy (ds->type, fields[0], sizeof (ds->type));
ds->ds_num = fields_num - 1;