diff --git a/src/match_regex.c b/src/match_regex.c
index bbc35cd4c1284770d12840e8706040c7bbd00132..cd6301673a1a3673b8912375554da3a32bfd8bb1 100644 (file)
--- a/src/match_regex.c
+++ b/src/match_regex.c
*/
#include "collectd.h"
+
#include "filter_chain.h"
#include <sys/types.h>
static int mr_match_regexen (mr_regex_t *re_head, /* {{{ */
const char *string)
{
- mr_regex_t *re;
-
if (re_head == NULL)
return (FC_MATCH_MATCHES);
- for (re = re_head; re != NULL; re = re->next)
+ for (mr_regex_t *re = re_head; re != NULL; re = re->next)
{
int status;
{
mr_match_t *m;
int status;
- int i;
m = calloc (1, sizeof (*m));
if (m == NULL)
m->invert = 0;
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;
void module_register (void)
{
- match_proc_t mproc;
+ match_proc_t mproc = { 0 };
- memset (&mproc, 0, sizeof (mproc));
mproc.create = mr_create;
mproc.destroy = mr_destroy;
mproc.match = mr_match;