**/
#include "collectd.h"
+
#include "common.h"
#include "plugin.h"
const data_set_t *ds;
int status;
- size_t i;
if ((fh == NULL) || (buffer == NULL))
return (-1);
return (-1);
}
- if ((size_t) ds->ds_num != values_num)
+ if (ds->ds_num != values_num)
{
- ERROR ("ds[%s]->ds_num = %i, "
- "but uc_get_rate_by_name returned %u values.",
- ds->type, ds->ds_num, (unsigned int) values_num);
+ ERROR ("ds[%s]->ds_num = %zu, "
+ "but uc_get_rate_by_name returned %zu values.",
+ ds->type, ds->ds_num, values_num);
print_to_socket (fh, "-1 Error reading value from cache.\n");
sfree (values);
sfree (identifier_copy);
return (-1);
}
- print_to_socket (fh, "%u Value%s found\n", (unsigned int) values_num,
+ print_to_socket (fh, "%zu Value%s found\n", values_num,
(values_num == 1) ? "" : "s");
- for (i = 0; i < values_num; i++)
+ for (size_t i = 0; i < values_num; i++)
{
print_to_socket (fh, "%s=", ds->ds[i].name);
if (isnan (values[i]))