X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fwrite_tsdb.c;h=f8f4cb9104efb1753a875402510ecabc0eb1adc3;hp=349b0d0c6fd2d353d745438045f52b61627ecd09;hb=a59c14adfa86c823efff87ca797c4d6e6ce32913;hpb=358bf39b09f69220fc8e1b6c2fe98e5e185e3364 diff --git a/src/write_tsdb.c b/src/write_tsdb.c index 349b0d0c..f8f4cb91 100644 --- a/src/write_tsdb.c +++ b/src/write_tsdb.c @@ -43,8 +43,8 @@ #include "collectd.h" -#include "common.h" #include "plugin.h" +#include "utils/common/common.h" #include "utils_cache.h" #include "utils_random.h" @@ -79,8 +79,8 @@ struct wt_callback { char *service; char *host_tags; - _Bool store_rates; - _Bool always_append_ds; + bool store_rates; + bool always_append_ds; char send_buf[WT_SEND_BUF_SIZE]; size_t send_buf_free; @@ -89,13 +89,13 @@ struct wt_callback { pthread_mutex_t send_lock; - _Bool connect_failed_log_enabled; + bool connect_failed_log_enabled; int connect_dns_failed_attempts_remaining; cdtime_t next_random_ttl; }; -static cdtime_t resolve_interval = 0; -static cdtime_t resolve_jitter = 0; +static cdtime_t resolve_interval; +static cdtime_t resolve_jitter; /* * Functions @@ -152,7 +152,7 @@ static int wt_flush_nolock(cdtime_t timeout, struct wt_callback *cb) { return status; } -static cdtime_t new_random_ttl() { +static cdtime_t new_random_ttl(void) { if (resolve_jitter == 0) return 0; @@ -313,7 +313,7 @@ static int wt_flush(cdtime_t timeout, static int wt_format_values(char *ret, size_t ret_len, int ds_num, const data_set_t *ds, const value_list_t *vl, - _Bool store_rates) { + bool store_rates) { size_t offset = 0; int status; gauge_t *rates = NULL;