typedef struct instance_definition_s instance_definition_t;
/* Private */
-static metric_definition_t *metric_head = NULL;
+static metric_definition_t *metric_head;
static int tcsv_submit(instance_definition_t *id, metric_definition_t *md,
value_t v, cdtime_t t) {
return tcsv_submit(id, md, v, t);
}
-static _Bool tcsv_check_index(ssize_t index, size_t fields_num,
- char const *name) {
+static bool tcsv_check_index(ssize_t index, size_t fields_num,
+ char const *name) {
if (index < 0)
- return 1;
+ return true;
else if (((size_t)index) < fields_num)
- return 1;
+ return true;
ERROR("tail_csv plugin: Metric \"%s\": Request for index %zd when "
- "only %zu fields are available.",
+ "only %" PRIsz " fields are available.",
name, index, fields_num);
- return 0;
+ return false;
}
static int tcsv_read_buffer(instance_definition_t *id, char *buffer,
} /* int tcsv_config */
static int tcsv_init(void) { /* {{{ */
- static _Bool have_init = 0;
+ static bool have_init;
metric_definition_t *md;
if (have_init)
md->type, md->name);
continue;
} else if (ds->ds_num != 1) {
- ERROR("tail_csv plugin: The type \"%s\" has %zu data sources. "
+ ERROR("tail_csv plugin: The type \"%s\" has %" PRIsz " data sources. "
"Only types with a single data source are supported.",
ds->type, ds->ds_num);
continue;