From: Marc Fournier Date: Sat, 4 Apr 2015 23:44:50 +0000 (+0200) Subject: write_http: make sure CURLOPT_* only get longs X-Git-Tag: collectd-5.5.0~57^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=943d5088b10e88009b98948d016c623f1d61bb17;p=collectd.git write_http: make sure CURLOPT_* only get longs ... to avoid portability problems. --- diff --git a/src/write_http.c b/src/write_http.c index ad4dd8a4..3b594be4 100644 --- a/src/write_http.c +++ b/src/write_http.c @@ -127,13 +127,13 @@ static int wh_callback_init (wh_callback_t *cb) /* {{{ */ if (cb->low_speed_limit > 0 && cb->low_speed_time > 0) { curl_easy_setopt (cb->curl, CURLOPT_LOW_SPEED_LIMIT, - (cb->low_speed_limit * cb->low_speed_time)); + (long) (cb->low_speed_limit * cb->low_speed_time)); curl_easy_setopt (cb->curl, CURLOPT_LOW_SPEED_TIME, - cb->low_speed_time); + (long) cb->low_speed_time); } if (cb->timeout > 0) - curl_easy_setopt (cb->curl, CURLOPT_TIMEOUT_MS, cb->timeout); + curl_easy_setopt (cb->curl, CURLOPT_TIMEOUT_MS, (long) cb->timeout); curl_easy_setopt (cb->curl, CURLOPT_NOSIGNAL, 1L); curl_easy_setopt (cb->curl, CURLOPT_USERAGENT, COLLECTD_USERAGENT);