diff --git a/src/ethstat.c b/src/ethstat.c
index dec14f3d148962df3b1aaf41eb1f50f0a7a5f92c..a30a5d155243bb193892455dc56afe8bbc5d5c36 100644 (file)
--- a/src/ethstat.c
+++ b/src/ethstat.c
for (i = 0; i < n_stats; i++)
{
- const char *stat_name;
+ char *stat_name;
stat_name = (void *) &strings->data[i * ETH_GSTRING_LEN];
+ /* Remove leading spaces in key name */
+ while (isspace ((int) *stat_name))
+ stat_name++;
+
DEBUG("ethstat plugin: device = \"%s\": %s = %"PRIu64,
device, stat_name, (uint64_t) stats->data[i]);
ethstat_submit_value (device,