diff --git a/src/zone.c b/src/zone.c
index 0e9fee386f8c47749da5d320f407dfce4a56a545..3751bfde9e95ee4522587261f74b8954e708128c 100644 (file)
--- a/src/zone.c
+++ b/src/zone.c
#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>
ushort_t pctmem;
} zone_stats_t;
-static long pagesize;
-
-static int zone_init (void)
-{
- pagesize = sysconf(_SC_PAGESIZE);
- return (0);
-}
-
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);
}
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);
}
void module_register (void)
{
- plugin_register_init ("zone", zone_init);
plugin_register_read ("zone", zone_read);
} /* void module_register */