X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fceph_test.c;h=e403292942945bb9b85dee7f62dc98cfc3f0f052;hp=2f65b509385e2f39573d0b520e031c09451f1a4e;hb=54619dc85fd308b21ed09a0271e5c7383c7921b9;hpb=fb0cc621d4357bbe4a9dc36c7f055f46257ce57c diff --git a/src/ceph_test.c b/src/ceph_test.c index 2f65b509..e4032929 100644 --- a/src/ceph_test.c +++ b/src/ceph_test.c @@ -39,7 +39,7 @@ static int test_handler(void *user, char const *val, char const *key) { size_t i; char status[1024]; - _Bool ok; + bool ok; /* special case for latency metrics. */ if (strcmp("filestore.example_latency", key) == 0) @@ -47,7 +47,7 @@ static int test_handler(void *user, char const *val, char const *key) { snprintf(status, sizeof(status), "unexpected call: test_handler(\"%s\") = \"%s\"", key, val); - ok = 0; + ok = false; for (i = 0; i < t->cases_num; i++) { if (strcmp(key, t->cases[i].key) != 0) @@ -57,12 +57,12 @@ static int test_handler(void *user, char const *val, char const *key) { snprintf(status, sizeof(status), "test_handler(\"%s\") = \"%s\", want \"%s\"", key, val, t->cases[i].value); - ok = 0; + ok = false; break; } snprintf(status, sizeof(status), "test_handler(\"%s\") = \"%s\"", key, val); - ok = 1; + ok = true; break; } @@ -123,7 +123,7 @@ DEF_TEST(traverse_json) { {"WBThrottle.ios_wb.type", "2"}, {"WBThrottle.inodes_dirtied.type", "2"}, {"WBThrottle.inodes_wb.type", "10"}, - {"filestore.journal_wr_bytes", "3117"}, + {"filestore.journal_wr_bytes.sum", "3117"}, {"filestore.example_latency.avgcount", "42"}, {"filestore.example_latency.sum", "4711"}, };