From: Ruben Kerkhof Date: Fri, 10 Jun 2016 07:48:23 +0000 (+0200) Subject: Merge branch 'collectd-5.5' X-Git-Tag: collectd-5.6.0~226 X-Git-Url: https://git.octo.it/?p=collectd.git;a=commitdiff_plain;h=38909dcf1dcb596c5f525c6bb25cf89c046013b5;hp=d3ca6fecf93f7c0cf32f38e02f66ce238dbf96b6 Merge branch 'collectd-5.5' --- diff --git a/src/ethstat.c b/src/ethstat.c index 8971f4df..e10021c5 100644 --- a/src/ethstat.c +++ b/src/ethstat.c @@ -311,9 +311,13 @@ static int ethstat_read_interface (char *device) 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,