X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Futils_match.c;h=4d4b57d08051b31e91dceb0a8bf43a4e67695dfe;hb=6624c959628fa1188f8cfa4789da1eccccc5f5e4;hp=0f87bc0c56d7810908320296e7b6f97c2ef2b338;hpb=593ea76dca367478b92e17f91e663fe7c67b4df9;p=collectd.git diff --git a/src/utils_match.c b/src/utils_match.c index 0f87bc0c..4d4b57d0 100644 --- a/src/utils_match.c +++ b/src/utils_match.c @@ -83,7 +83,7 @@ static int default_callback (const char __attribute__((unused)) *str, if (matches_num < 2) return (-1); - value = strtod (matches[1], &endptr); + value = (gauge_t) strtod (matches[1], &endptr); if (matches[1] == endptr) return (-1); @@ -131,7 +131,7 @@ static int default_callback (const char __attribute__((unused)) *str, if (matches_num < 2) return (-1); - value = strtoll (matches[1], &endptr, 0); + value = (counter_t) strtoull (matches[1], &endptr, 0); if (matches[1] == endptr) return (-1); @@ -162,7 +162,7 @@ static int default_callback (const char __attribute__((unused)) *str, 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); @@ -186,7 +186,7 @@ static int default_callback (const char __attribute__((unused)) *str, if (matches_num < 2) return (-1); - value = strtoll (matches[1], &endptr, 0); + value = (absolute_t) strtoull (matches[1], &endptr, 0); if (matches[1] == endptr) return (-1);