projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
dispatch proper values in Python write plugin
[collectd.git]
/
src
/
utils_match.c
diff --git
a/src/utils_match.c
b/src/utils_match.c
index
bdbad3f
..
2aaeb96
100644
(file)
--- a/
src/utils_match.c
+++ b/
src/utils_match.c
@@
-81,7
+81,7
@@
static int default_callback (const char __attribute__((unused)) *str,
if (matches_num < 2)
return (-1);
if (matches_num < 2)
return (-1);
- value = strtod (matches[1], &endptr);
+ value =
(gauge_t)
strtod (matches[1], &endptr);
if (matches[1] == endptr)
return (-1);
if (matches[1] == endptr)
return (-1);
@@
-129,7
+129,7
@@
static int default_callback (const char __attribute__((unused)) *str,
if (matches_num < 2)
return (-1);
if (matches_num < 2)
return (-1);
- value =
strto
ll (matches[1], &endptr, 0);
+ value =
(counter_t) strtou
ll (matches[1], &endptr, 0);
if (matches[1] == endptr)
return (-1);
if (matches[1] == endptr)
return (-1);
@@
-160,7
+160,7
@@
static int default_callback (const char __attribute__((unused)) *str,
if (matches_num < 2)
return (-1);
if (matches_num < 2)
return (-1);
- value = strtoll (matches[1], &endptr, 0);
+ value =
(derive_t)
strtoll (matches[1], &endptr, 0);
if (matches[1] == endptr)
return (-1);
if (matches[1] == endptr)
return (-1);
@@
-184,7
+184,7
@@
static int default_callback (const char __attribute__((unused)) *str,
if (matches_num < 2)
return (-1);
if (matches_num < 2)
return (-1);
- value =
strto
ll (matches[1], &endptr, 0);
+ value =
(absolute_t) strtou
ll (matches[1], &endptr, 0);
if (matches[1] == endptr)
return (-1);
if (matches[1] == endptr)
return (-1);
@@
-225,7
+225,7
@@
cu_match_t *match_create_callback (const char *regex,
return (NULL);
memset (obj, '\0', sizeof (cu_match_t));
return (NULL);
memset (obj, '\0', sizeof (cu_match_t));
- status = regcomp (&obj->regex, regex, REG_EXTENDED);
+ status = regcomp (&obj->regex, regex, REG_EXTENDED
| REG_NEWLINE
);
if (status != 0)
{
ERROR ("Compiling the regular expression \"%s\" failed.", regex);
if (status != 0)
{
ERROR ("Compiling the regular expression \"%s\" failed.", regex);