X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Ftail_csv.c;h=ff967052d7a7727dadf2e228123ab6dd7c1c3ed5;hb=6e41c3b1f024d7944e5e8010a87933555c662474;hp=2e3ac5f0bbd639a27e4f61b5d74143c9566eb3f6;hpb=7c2336dde35a7b42853b6ca167d4164619e52333;p=collectd.git diff --git a/src/tail_csv.c b/src/tail_csv.c index 2e3ac5f0..ff967052 100644 --- a/src/tail_csv.c +++ b/src/tail_csv.c @@ -120,17 +120,17 @@ static int tcsv_read_metric(instance_definition_t *id, metric_definition_t *md, 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, @@ -513,7 +513,7 @@ static int tcsv_config(oconfig_item_t *ci) { } /* int tcsv_config */ static int tcsv_init(void) { /* {{{ */ - static _Bool have_init = 0; + static bool have_init; metric_definition_t *md; if (have_init) @@ -532,7 +532,7 @@ static int tcsv_init(void) { /* {{{ */ 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;