From 165b18c82933bfbab41673804811df518c092d50 Mon Sep 17 00:00:00 2001 From: Toni Uhlig Date: Tue, 11 Jun 2024 15:07:17 +0200 Subject: Fixed OpenWrt `nDPId-testing` build. Signed-off-by: Toni Uhlig --- examples/c-influxd/c-influxd.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'examples/c-influxd/c-influxd.c') diff --git a/examples/c-influxd/c-influxd.c b/examples/c-influxd/c-influxd.c index 6477480f6..6ab88a9c7 100644 --- a/examples/c-influxd/c-influxd.c +++ b/examples/c-influxd/c-influxd.c @@ -1,5 +1,6 @@ #include #include +#include #include #include #include @@ -737,7 +738,7 @@ static int init_influx_ctx(struct influx_ctx * const ctx, char const * const url if (curl_easy_setopt(ctx->curl, CURLOPT_URL, url) != CURLE_OK || curl_easy_setopt(ctx->curl, CURLOPT_USERAGENT, "nDPIsrvd-influxd") != CURLE_OK || curl_easy_setopt(ctx->curl, CURLOPT_HTTPHEADER, ctx->http_header) != CURLE_OK || - curl_easy_setopt(ctx->curl, CURLOPT_TIMEOUT, influxdb_interval_ull) != CURLE_OK) + curl_easy_setopt(ctx->curl, CURLOPT_TIMEOUT, (long)influxdb_interval_ull) != CURLE_OK) { return -1; } @@ -774,7 +775,7 @@ static void post_influx_ctx(struct influx_ctx * const ctx) static void * send_to_influxdb(void * thread_data) { - struct influx_ctx influx_ctx; + struct influx_ctx influx_ctx = {}; (void)thread_data; init_influx_ctx(&influx_ctx, influxdb_url, influxdb_token); -- cgit v1.2.3