diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2017-01-22 10:02:55 +0100 |
---|---|---|
committer | Sven Nierlein <sven@nierlein.de> | 2018-10-22 16:28:51 +0200 |
commit | c9a94ffd44d01b70bed3b062167b9aaab4e41244 (patch) | |
tree | d666c9df011c965d77be638ea66335c536303147 | |
parent | ad9233ce1c41d4459a2843903872a47a5ac4b45d (diff) | |
download | monitoring-plugins-c9a94ffd44d01b70bed3b062167b9aaab4e41244.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 */ |