From: Francesco Romani Date: Wed, 15 Feb 2017 14:27:34 +0000 (+0100) Subject: virt plugin: don't shadow global variable X-Git-Tag: collectd-5.8.0~234^2 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=9907031fdc5b09a7b108bab6488dab2575473766;p=collectd.git virt plugin: don't shadow global variable and use a matching type for local one. --- diff --git a/src/virt.c b/src/virt.c index 68a8e6b9..51682993 100644 --- a/src/virt.c +++ b/src/virt.c @@ -485,18 +485,18 @@ static void disk_submit(struct lv_block_info *binfo, virDomainPtr dom, } static unsigned int parse_ex_stats_flags(char **exstats, int numexstats) { - int extra_stats = ex_stats_none; + unsigned int ex_stats_flags = ex_stats_none; for (int i = 0; i < numexstats; i++) { for (int j = 0; ex_stats_table[j].name != NULL; j++) { if (strcasecmp(exstats[i], ex_stats_table[j].name) == 0) { DEBUG(PLUGIN_NAME " plugin: enabling extra stats for '%s'", ex_stats_table[j].name); - extra_stats |= ex_stats_table[j].flag; + ex_stats_flags |= ex_stats_table[j].flag; break; } } } - return extra_stats; + return ex_stats_flags; } static int lv_config(const char *key, const char *value) {