X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Ftarget_replace.c;h=40a6fec992687466720d11abea95778fb5984aa2;hb=448627953cde2f7b3b138f53f4f2c62f0d48b726;hp=8389ce3f5fca6fd4b878203c53f3449e1f266d9a;hpb=a5377cf935630082f2eac2e5f4a538844cc06c8d;p=collectd.git diff --git a/src/target_replace.c b/src/target_replace.c index 8389ce3f..40a6fec9 100644 --- a/src/target_replace.c +++ b/src/target_replace.c @@ -156,7 +156,6 @@ static int tr_config_add_action (tr_action_t **dest, /* {{{ */ static int tr_action_invoke (tr_action_t *act_head, /* {{{ */ char *buffer_in, size_t buffer_in_size, int may_be_empty) { - tr_action_t *act; int status; char buffer[DATA_MAX_NAME_LEN]; regmatch_t matches[8] = { [0] = { 0 } }; @@ -168,7 +167,7 @@ static int tr_action_invoke (tr_action_t *act_head, /* {{{ */ DEBUG ("target_replace plugin: tr_action_invoke: <- buffer = %s;", buffer); - for (act = act_head; act != NULL; act = act->next) + for (tr_action_t *act = act_head; act != NULL; act = act->next) { char temp[DATA_MAX_NAME_LEN]; char *subst_status; @@ -241,7 +240,6 @@ static int tr_create (const oconfig_item_t *ci, void **user_data) /* {{{ */ { tr_data_t *data; int status; - int i; data = calloc (1, sizeof (*data)); if (data == NULL) @@ -257,7 +255,7 @@ static int tr_create (const oconfig_item_t *ci, void **user_data) /* {{{ */ data->type_instance = NULL; status = 0; - for (i = 0; i < ci->children_num; i++) + for (int i = 0; i < ci->children_num; i++) { oconfig_item_t *child = ci->children + i;