From: Florian Forster Date: Tue, 17 Aug 2010 06:05:38 +0000 (+0200) Subject: src/utils_match.c: Use strtoull(3) for counter and absolute data sources. X-Git-Tag: collectd-4.9.4~24 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=459c30811590c42d0d47922199577f0b61f54962;p=collectd.git src/utils_match.c: Use strtoull(3) for counter and absolute data sources. --- 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);