X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Futils_match.c;h=e4240eab607c497f8ff61444cc2c953e1e50b7d6;hb=459c30811590c42d0d47922199577f0b61f54962;hp=9dd2da7db84a5d11b77adb3cdf1ff34727d99d51;hpb=fd4a555fed0d88033e2e5bbe3c84f9847fd1ec22;p=collectd.git diff --git a/src/utils_match.c b/src/utils_match.c index 9dd2da7d..e4240eab 100644 --- 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); - value = strtod (matches[1], &endptr); + value = (gauge_t) strtod (matches[1], &endptr); 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); - value = strtoll (matches[1], &endptr, 0); + value = (counter_t) strtoull (matches[1], &endptr, 0); 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); - value = strtoll (matches[1], &endptr, 0); + value = (absolute_t) strtoull (matches[1], &endptr, 0); if (matches[1] == endptr) return (-1);