int status;
if (plugins_loaded == NULL)
- plugins_loaded = c_avl_create ((void *) strcasecmp);
+ plugins_loaded = c_avl_create ((int (*) (const void *, const void *)) strcasecmp);
assert (plugins_loaded != NULL);
status = c_avl_get (plugins_loaded, name, /* ret_value = */ NULL);
if (value_map == NULL)
{
- value_map = c_avl_create ((void *) strcmp);
+ value_map = c_avl_create ((int (*) (const void *, const void *)) strcmp);
if (value_map == NULL)
{
sfree (map);
(mc_receive_port != NULL) ? mc_receive_port : MC_RECEIVE_PORT_DEFAULT,
/* listen = */ 0);
- staging_tree = c_avl_create ((void *) strcmp);
+ staging_tree = c_avl_create ((int (*) (const void *, const void *)) strcmp);
if (staging_tree == NULL)
{
ERROR ("gmond plugin: c_avl_create failed.");
/* Make sure metric->set exists. */
if (metric->set == NULL)
- metric->set = c_avl_create ((void *) strcmp);
+ metric->set = c_avl_create ((int (*) (const void *, const void *)) strcmp);
if (metric->set == NULL)
{
{
pthread_mutex_lock (&metrics_lock);
if (metrics_tree == NULL)
- metrics_tree = c_avl_create ((void *) strcmp);
+ metrics_tree = c_avl_create ((int (*) (const void *, const void *)) strcmp);
if (!network_thread_running)
{
if (threshold_tree == NULL)
{
- threshold_tree = c_avl_create ((void *) strcmp);
+ threshold_tree = c_avl_create ((int (*) (const void *, const void *)) strcmp);
if (threshold_tree == NULL)
{
ERROR ("ut_config: c_avl_create failed.");
return (-1);
}
- tree = c_avl_create ((void *) strcmp);
+ tree = c_avl_create ((int (*) (const void *, const void *)) strcmp);
if (tree == NULL)
{
fclose (fh);
}
by_type->wildcard_plugin_list = NULL;
- by_type->by_plugin_tree = c_avl_create ((void *) strcmp);
+ by_type->by_plugin_tree = c_avl_create ((int (*) (const void *, const void *)) strcmp);
if (by_type->by_plugin_tree == NULL)
{
ERROR ("utils_vl_lookup: c_avl_create failed.");
return (NULL);
}
- obj->by_type_tree = c_avl_create ((void *) strcmp);
+ obj->by_type_tree = c_avl_create ((int (*) (const void *, const void *)) strcmp);
if (obj->by_type_tree == NULL)
{
ERROR ("utils_vl_lookup: c_avl_create failed.");
} 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);
}
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);
}