check and warn about capabilities misconfiguration
[collectd.git] / src / zone.c
index ba07c9e..3751bfd 100644 (file)
 #endif
 
 #include "collectd.h"
+
 #include "common.h"
 #include "plugin.h"
 
-#include <sys/types.h>
-#include <sys/vm_usage.h>
 #include <procfs.h>
 #include <zone.h>
 
@@ -50,11 +49,11 @@ typedef struct zone_stats {
 } zone_stats_t;
 
 static int
-zone_compare(const zoneid_t *a, const zoneid_t *b)
+zone_compare(const void *a, const void *b)
 {
-       if (*a == *b)
+       if (*(const zoneid_t *)a == *(const zoneid_t *)b)
                return(0);
-       if (*a < *b)
+       if (*(const zoneid_t *)a < *(const zoneid_t *)b)
                return(-1);
        return(1);
 }
@@ -154,7 +153,7 @@ zone_scandir(DIR *procdir)
        c_avl_tree_t *tree;
        zone_stats_t *stats;
 
-       if (!(tree=c_avl_create((void *) zone_compare))) {
+       if (!(tree=c_avl_create(zone_compare))) {
                WARNING("zone plugin: Failed to create tree");
                return(NULL);
        }