Merge branch 'sh/collectd-5.1' into collectd-5.1
authorFlorian Forster <octo@collectd.org>
Mon, 27 Aug 2012 08:12:11 +0000 (10:12 +0200)
committerFlorian Forster <octo@collectd.org>
Mon, 27 Aug 2012 08:12:11 +0000 (10:12 +0200)
src/nfs.c
src/zfs_arc.c

index 58f2e0d..461e806 100644 (file)
--- a/src/nfs.c
+++ b/src/nfs.c
@@ -332,10 +332,12 @@ static int nfs_read_kstat (kstat_t *ksp, int nfs_version, char *inst,
 
        kstat_read(kc, ksp, NULL);
        for (i = 0; i < proc_names_num; i++)
-               values[i].counter = (derive_t) get_kstat_value (ksp, proc_names[i]);
+               values[i].counter = (derive_t) get_kstat_value (ksp,
+                               (char *)proc_names[i]);
 
        nfs_procedures_submit (plugin_instance, proc_names, values,
                        proc_names_num);
+       return (0);
 }
 #endif
 
index e77569f..f4352ff 100644 (file)
@@ -60,7 +60,7 @@ static int za_read_derive (kstat_t *ksp, const char *kstat_value,
   long long tmp;
   value_t v;
 
-  tmp = get_kstat_value (ksp, kstat_value);
+  tmp = get_kstat_value (ksp, (char *)kstat_value);
   if (tmp == -1LL)
   {
     ERROR ("zfs_arc plugin: Reading kstat value \"%s\" failed.", kstat_value);
@@ -69,6 +69,7 @@ static int za_read_derive (kstat_t *ksp, const char *kstat_value,
 
   v.derive = (derive_t) tmp;
   za_submit (type, type_instance, /* values = */ &v, /* values_num = */ 1);
+  return (0);
 }
 
 static int za_read_gauge (kstat_t *ksp, const char *kstat_value,
@@ -77,7 +78,7 @@ static int za_read_gauge (kstat_t *ksp, const char *kstat_value,
   long long tmp;
   value_t v;
 
-  tmp = get_kstat_value (ksp, kstat_value);
+  tmp = get_kstat_value (ksp, (char *)kstat_value);
   if (tmp == -1LL)
   {
     ERROR ("zfs_arc plugin: Reading kstat value \"%s\" failed.", kstat_value);
@@ -86,6 +87,7 @@ static int za_read_gauge (kstat_t *ksp, const char *kstat_value,
 
   v.gauge = (gauge_t) tmp;
   za_submit (type, type_instance, /* values = */ &v, /* values_num = */ 1);
+  return (0);
 }
 
 static void za_submit_ratio (const char* type_instance, gauge_t hits, gauge_t misses)