diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2017-01-22 10:02:55 +0100 |
---|---|---|
committer | Sven Nierlein <sven@nierlein.de> | 2017-03-14 19:57:49 +0100 |
commit | 6c9086a35eb8e8283a2fd113918ee0016681f7b7 (patch) | |
tree | 4d48ba6524768edeb5680e6b3b822e3d2a3d1501 | |
parent | 5d37ec20be202d6fecd5df8c9496499b66bbdc23 (diff) | |
download | monitoring-plugins-6c9086a.tar.gz |
added some casts for curl write functions
-rw-r--r-- | plugins/check_curl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/check_curl.c b/plugins/check_curl.c index a0e6d8f9..cd77be33 100644 --- a/plugins/check_curl.c +++ b/plugins/check_curl.c | |||
@@ -168,13 +168,13 @@ main (int argc, char **argv) | |||
168 | /* initialize buffer for body of the answer */ | 168 | /* initialize buffer for body of the answer */ |
169 | if (curlhelp_initbuffer(&body_buf) < 0) | 169 | if (curlhelp_initbuffer(&body_buf) < 0) |
170 | die (STATE_UNKNOWN, "HTTP CRITICAL - out of memory allocating buffer for body\n"); | 170 | die (STATE_UNKNOWN, "HTTP CRITICAL - out of memory allocating buffer for body\n"); |
171 | curl_easy_setopt (curl, CURLOPT_WRITEFUNCTION, curlhelp_buffer_callback); | 171 | curl_easy_setopt (curl, CURLOPT_WRITEFUNCTION, (curl_write_callback)curlhelp_buffer_callback); |
172 | curl_easy_setopt (curl, CURLOPT_WRITEDATA, (void *)&body_buf); | 172 | curl_easy_setopt (curl, CURLOPT_WRITEDATA, (void *)&body_buf); |
173 | 173 | ||
174 | /* initialize buffer for header of the answer */ | 174 | /* initialize buffer for header of the answer */ |
175 | if (curlhelp_initbuffer( &header_buf ) < 0) | 175 | if (curlhelp_initbuffer( &header_buf ) < 0) |
176 | die (STATE_UNKNOWN, "HTTP CRITICAL - out of memory allocating buffer for header\n" ); | 176 | die (STATE_UNKNOWN, "HTTP CRITICAL - out of memory allocating buffer for header\n" ); |
177 | curl_easy_setopt (curl, CURLOPT_HEADERFUNCTION, curlhelp_buffer_callback); | 177 | curl_easy_setopt (curl, CURLOPT_HEADERFUNCTION, (curl_write_callback)curlhelp_buffer_callback); |
178 | curl_easy_setopt (curl, CURLOPT_WRITEHEADER, (void *)&header_buf); | 178 | curl_easy_setopt (curl, CURLOPT_WRITEHEADER, (void *)&header_buf); |
179 | 179 | ||
180 | /* set the error buffer */ | 180 | /* set the error buffer */ |