projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'collectd-5.5'
[collectd.git]
/
src
/
daemon
/
types_list.c
diff --git
a/src/daemon/types_list.c
b/src/daemon/types_list.c
index
cf28c2e
..
de6fce3
100644
(file)
--- a/
src/daemon/types_list.c
+++ b/
src/daemon/types_list.c
@@
-29,6
+29,7
@@
#include "plugin.h"
#include "configfile.h"
#include "plugin.h"
#include "configfile.h"
+#include "types_list.h"
static int parse_ds (data_source_t *dsrc, char *buf, size_t buf_len)
{
static int parse_ds (data_source_t *dsrc, char *buf, size_t buf_len)
{
@@
-111,12
+112,10
@@
static void parse_line (char *buf)
if (fields[0][0] == '#')
return;
if (fields[0][0] == '#')
return;
- ds =
(data_set_t *) malloc (sizeof (data_set_t
));
+ ds =
calloc (1, sizeof (*ds
));
if (ds == NULL)
return;
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;
sstrncpy (ds->type, fields[0], sizeof (ds->type));
ds->ds_num = fields_num - 1;