projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'collectd-5.5' into collectd-5.6
[collectd.git]
/
src
/
daemon
/
utils_match.c
diff --git
a/src/daemon/utils_match.c
b/src/daemon/utils_match.c
index
cf87b6b
..
914b6e2
100644
(file)
--- a/
src/daemon/utils_match.c
+++ b/
src/daemon/utils_match.c
@@
-25,6
+25,7
@@
**/
#include "collectd.h"
**/
#include "collectd.h"
+
#include "common.h"
#include "plugin.h"
#include "common.h"
#include "plugin.h"
@@
-169,7
+170,7
@@
static int default_callback (const char __attribute__((unused)) *str,
if (data->ds_type & UTILS_MATCH_CF_DERIVE_INC)
{
if (data->ds_type & UTILS_MATCH_CF_DERIVE_INC)
{
- data->value.
counter
++;
+ data->value.
derive
++;
data->values_num++;
return (0);
}
data->values_num++;
return (0);
}
@@
-321,9
+322,8
@@
int match_apply (cu_match_t *obj, const char *str)
{
int status;
regmatch_t re_match[32];
{
int status;
regmatch_t re_match[32];
- char *matches[32];
+ char *matches[32]
= { 0 }
;
size_t matches_num;
size_t matches_num;
- size_t i;
if ((obj == NULL) || (str == NULL))
return (-1);
if ((obj == NULL) || (str == NULL))
return (-1);
@@
-347,7
+347,6
@@
int match_apply (cu_match_t *obj, const char *str)
if (status != 0)
return (0);
if (status != 0)
return (0);
- memset (matches, '\0', sizeof (matches));
for (matches_num = 0; matches_num < STATIC_ARRAY_SIZE (matches); matches_num++)
{
if ((re_match[matches_num].rm_so < 0)
for (matches_num = 0; matches_num < STATIC_ARRAY_SIZE (matches); matches_num++)
{
if ((re_match[matches_num].rm_so < 0)
@@
-376,7
+375,7
@@
int match_apply (cu_match_t *obj, const char *str)
}
}
}
}
- for (i = 0; i < matches_num; i++)
+ for (
size_t
i = 0; i < matches_num; i++)
{
sfree (matches[i]);
}
{
sfree (matches[i]);
}