X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fdaemon%2Ftypes_list.c;h=c3f590c15f5c51a203eeb40e8493de1b83606742;hp=1ccf10bcb6deb7d3f041ceaee16bc7a0171d3198;hb=f03ad26a9152f21c27a86103683b20ca116520bf;hpb=3e795a5ff7f079b4d41d582bc97fb3332b727cc9 diff --git a/src/daemon/types_list.c b/src/daemon/types_list.c index 1ccf10bc..c3f590c1 100644 --- a/src/daemon/types_list.c +++ b/src/daemon/types_list.c @@ -113,7 +113,7 @@ static void parse_line(char *buf) { sstrncpy(ds->type, fields[0], sizeof(ds->type)); ds->ds_num = fields_num - 1; - ds->ds = (data_source_t *)calloc(ds->ds_num, sizeof(data_source_t)); + ds->ds = calloc(ds->ds_num, sizeof(*ds->ds)); if (ds->ds == NULL) { sfree(ds); return;