X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Ftarget_replace.c;h=8d774c570f849d7beed5e378a7d936c5d6f2a070;hb=dc6f54ccc87c5ae63d29f05eca91714ade689691;hp=545fa3530f960a61c26be2012cbebd8fcc0d4290;hpb=826293bf3acfdcee6632f5d8f0b6be013f2cebab;p=collectd.git diff --git a/src/target_replace.c b/src/target_replace.c index 545fa353..8d774c57 100644 --- a/src/target_replace.c +++ b/src/target_replace.c @@ -158,13 +158,12 @@ static int tr_action_invoke (tr_action_t *act_head, /* {{{ */ tr_action_t *act; int status; char buffer[DATA_MAX_NAME_LEN]; - regmatch_t matches[8]; + regmatch_t matches[8] = { [0] = { 0 } }; if (act_head == NULL) return (-EINVAL); sstrncpy (buffer, buffer_in, sizeof (buffer)); - memset (matches, 0, sizeof (matches)); DEBUG ("target_replace plugin: tr_action_invoke: <- buffer = %s;", buffer); @@ -346,9 +345,8 @@ static int tr_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 = tr_create; tproc.destroy = tr_destroy; tproc.invoke = tr_invoke;