Merge branch 'collectd-4.9' into collectd-4.10
[collectd.git] / src / utils_match.c
index 0f87bc0..4d4b57d 100644 (file)
@@ -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);