projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #1842 from rubenk/declare-loop-variable-in-for-loop-controlling...
[collectd.git]
/
src
/
zone.c
diff --git
a/src/zone.c
b/src/zone.c
index
ba07c9e
..
3751bfd
100644
(file)
--- a/
src/zone.c
+++ b/
src/zone.c
@@
-31,11
+31,10
@@
#endif
#include "collectd.h"
#endif
#include "collectd.h"
+
#include "common.h"
#include "plugin.h"
#include "common.h"
#include "plugin.h"
-#include <sys/types.h>
-#include <sys/vm_usage.h>
#include <procfs.h>
#include <zone.h>
#include <procfs.h>
#include <zone.h>
@@
-50,11
+49,11
@@
typedef struct zone_stats {
} zone_stats_t;
static int
} 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);
return(0);
- if (*
a < *
b)
+ if (*
(const zoneid_t *)a < *(const zoneid_t *)
b)
return(-1);
return(1);
}
return(-1);
return(1);
}
@@
-154,7
+153,7
@@
zone_scandir(DIR *procdir)
c_avl_tree_t *tree;
zone_stats_t *stats;
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);
}
WARNING("zone plugin: Failed to create tree");
return(NULL);
}