X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Ftarget_scale.c;h=579d01a03c3908b0e5b8e85e5316ce1815a6f8c2;hb=5afde1077e3c8fc119b79caa2572cbf84dbfe5ca;hp=3ac399c904bcbafff2a803dc06bb6ee015d0485c;hpb=f14bb45d570e0b34bdd3a2a0cadfe414c3dfda40;p=collectd.git diff --git a/src/target_scale.c b/src/target_scale.c index 3ac399c9..579d01a0 100644 --- a/src/target_scale.c +++ b/src/target_scale.c @@ -328,7 +328,7 @@ static int ts_config_add_data_source(ts_data_t *data, /* {{{ */ /* Allocate space for the char pointers */ new_data_sources_num = data->data_sources_num + ((size_t) ci->values_num); - temp = (char **) realloc (data->data_sources, + temp = realloc (data->data_sources, new_data_sources_num * sizeof (char *)); if (temp == NULL) { @@ -490,9 +490,8 @@ static int ts_invoke (const data_set_t *ds, value_list_t *vl, /* {{{ */ void module_register (void) { - target_proc_t tproc; + target_proc_t tproc = { 0 }; - memset (&tproc, 0, sizeof (tproc)); tproc.create = ts_create; tproc.destroy = ts_destroy; tproc.invoke = ts_invoke;