static void stop_write_threads (void) /* {{{ */
{
write_queue_t *q;
- int i;
+ size_t i;
if (write_threads == NULL)
return;
if (i > 0)
{
- WARNING ("plugin: %i value list%s left after shutting down "
+ WARNING ("plugin: %zu value list%s left after shutting down "
"the write threads.",
i, (i == 1) ? " was" : "s were");
}
{
ERROR ("plugin_register_flush: malloc failed.");
sfree(flush_name);
- plugin_unregister (list_flush, name);
return (-1);
}
ERROR ("plugin_register_flush: strdup failed.");
sfree(cb);
sfree(flush_name);
- plugin_unregister (list_flush, name);
return (-1);
}
cb->timeout = ctx.flush_timeout;
{
sfree(cb->name);
sfree(cb);
- plugin_unregister (list_flush, name);
return status;
}
}
int plugin_register_data_set (const data_set_t *ds)
{
data_set_t *ds_copy;
- int i;
+ size_t i;
if ((data_sets != NULL)
&& (c_avl_get (data_sets, ds->type, NULL) == 0))
char *flush_name;
flush_name = plugin_flush_callback_name (name);
- if (flush_name == NULL)
- return (-1);
-
- plugin_unregister_read(flush_name);
- sfree(flush_name);
+ if (flush_name != NULL)
+ {
+ plugin_unregister_read(flush_name);
+ sfree(flush_name);
+ }
}
return plugin_unregister (list_flush, name);
if (ds->ds_num != vl->values_len)
{
ERROR ("plugin_dispatch_values: ds->type = %s: "
- "(ds->ds_num = %i) != "
- "(vl->values_len = %i)",
+ "(ds->ds_num = %zu) != "
+ "(vl->values_len = %zu)",
ds->type, ds->ds_num, vl->values_len);
return (-1);
}