X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fmic.c;h=b65679e7da226ada84f166c7ccbe2094bafd44aa;hb=4e89060ceb1a14ec7f9abfe9caa6b0da7e76bd5c;hp=a7ee433c2279f7e0e4f143bf66287b14f5bafe8f;hpb=e746ad785774de37a30302fef65f1c4aaf8698ab;p=collectd.git diff --git a/src/mic.c b/src/mic.c index a7ee433c..b65679e7 100644 --- a/src/mic.c +++ b/src/mic.c @@ -50,12 +50,12 @@ static const char *config_keys[] = { "ShowPower", "Power", "IgnoreSelectedPower"}; static int config_keys_num = STATIC_ARRAY_SIZE(config_keys); -static _Bool show_cpu = 1; -static _Bool show_cpu_cores = 1; -static _Bool show_memory = 1; -static _Bool show_temps = 1; +static bool show_cpu = true; +static bool show_cpu_cores = true; +static bool show_memory = true; +static bool show_temps = true; static ignorelist_t *temp_ignore = NULL; -static _Bool show_power = 1; +static bool show_power = true; static ignorelist_t *power_ignore = NULL; static int mic_init(void) { @@ -163,7 +163,6 @@ static void mic_submit_temp(int micnumber, const char *type, gauge_t value) { vl.values = &(value_t){.gauge = value}; vl.values_len = 1; - strncpy(vl.host, hostname_g, sizeof(vl.host)); strncpy(vl.plugin, "mic", sizeof(vl.plugin)); snprintf(vl.plugin_instance, sizeof(vl.plugin_instance), "%i", micnumber); strncpy(vl.type, "temperature", sizeof(vl.type)); @@ -205,7 +204,6 @@ static void mic_submit_cpu(int micnumber, const char *type_instance, int core, vl.values = &(value_t){.derive = value}; vl.values_len = 1; - strncpy(vl.host, hostname_g, sizeof(vl.host)); strncpy(vl.plugin, "mic", sizeof(vl.plugin)); if (core < 0) /* global aggregation */ snprintf(vl.plugin_instance, sizeof(vl.plugin_instance), "%i", micnumber); @@ -259,7 +257,6 @@ static void mic_submit_power(int micnumber, const char *type, vl.values = &(value_t){.gauge = value}; vl.values_len = 1; - strncpy(vl.host, hostname_g, sizeof(vl.host)); strncpy(vl.plugin, "mic", sizeof(vl.plugin)); snprintf(vl.plugin_instance, sizeof(vl.plugin_instance), "%i", micnumber); strncpy(vl.type, type, sizeof(vl.type));