- endptr = NULL;
- errno = 0;
- value_counter.counter = (counter_t) strtoll (msg_string.str,
- &endptr, /* base = */ 0);
- if ((endptr == msg_string.str) || (errno != 0))
- value_counter.counter = -1;
-
- endptr = NULL;
- errno = 0;
- value_gauge.gauge = (gauge_t) strtod (msg_string.str, &endptr);
- if ((endptr == msg_string.str) || (errno != 0))
+ status = parse_value (msg_string.str, &value_derive, DS_TYPE_DERIVE);
+ if (status != 0)
+ value_derive.derive = -1;
+
+ status = parse_value (msg_string.str, &value_gauge, DS_TYPE_GAUGE);
+ if (status != 0)