From 571adf14833c5425a80cd2e33790daee1c0735d5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Johan=20Wir=C3=A9n?= Date: Mon, 18 Mar 2013 22:49:32 +0100 Subject: [PATCH] Applied the suggested changes. --- src/libvirt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libvirt.c b/src/libvirt.c index 6b0cf9a4..10ca37f7 100644 --- a/src/libvirt.c +++ b/src/libvirt.c @@ -178,7 +178,7 @@ init_value_list (value_list_t *vl, virDomainPtr dom) } /* void init_value_list */ static void -memory_submit (unsigned long memory, virDomainPtr dom, const char *type) +memory_submit (gauge_t memory, virDomainPtr dom) { value_t values[1]; value_list_t vl = VALUE_LIST_INIT; @@ -190,7 +190,7 @@ memory_submit (unsigned long memory, virDomainPtr dom, const char *type) vl.values = values; vl.values_len = 1; - sstrncpy (vl.type, type, sizeof (vl.type)); + sstrncpy (vl.type, "memory", sizeof (vl.type)); plugin_dispatch_values (&vl); } @@ -441,7 +441,7 @@ lv_read (void) } cpu_submit (info.cpuTime, domains[i], "virt_cpu_total"); - memory_submit (info.memory, domains[i], "memory"); + memory_submit ((gauge_t) info.memory, domains[i]); vinfo = malloc (info.nrVirtCpu * sizeof (vinfo[0])); if (vinfo == NULL) { -- 2.30.2