X-Git-Url: https://git.octo.it/?a=blobdiff_plain;ds=sidebyside;f=src%2Fwrite_prometheus.c;h=6903aa06c632990edb08b56f8b0236ad5a39cd32;hb=61a4ed99b1a5b6d371bb745933d0efc5dff9505c;hp=26b0b4d4eb93f6193bade94adfd560d1290a69a4;hpb=506fbd9f7cc988eb9e0999c4779ff77c286e970f;p=collectd.git diff --git a/src/write_prometheus.c b/src/write_prometheus.c index 26b0b4d4..6903aa06 100644 --- a/src/write_prometheus.c +++ b/src/write_prometheus.c @@ -244,7 +244,7 @@ static int http_handler(void *cls, struct MHD_Connection *connection, char const *accept = MHD_lookup_connection_value(connection, MHD_HEADER_KIND, MHD_HTTP_HEADER_ACCEPT); - _Bool want_proto = + bool want_proto = (accept != NULL) && (strstr(accept, "application/vnd.google.protobuf") != NULL); @@ -689,7 +689,7 @@ static char *metric_family_name(data_set_t const *ds, value_list_t const *vl, * necessary. */ static Io__Prometheus__Client__MetricFamily * metric_family_get(data_set_t const *ds, value_list_t const *vl, size_t ds_index, - _Bool allocate) { + bool allocate) { char *name = metric_family_name(ds, vl, ds_index); if (name == NULL) { ERROR("write_prometheus plugin: Allocating metric family name failed.");