summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2017-01-22 09:02:55 (GMT)
committerSven Nierlein <sven@nierlein.de>2018-10-22 14:28:51 (GMT)
commitc9a94ffd44d01b70bed3b062167b9aaab4e41244 (patch)
treed666c9df011c965d77be638ea66335c536303147 /plugins
parentad9233ce1c41d4459a2843903872a47a5ac4b45d (diff)
downloadmonitoring-plugins-c9a94ffd44d01b70bed3b062167b9aaab4e41244.tar.gz
added some casts for curl write functions
Diffstat (limited to 'plugins')
-rw-r--r--plugins/check_curl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/check_curl.c b/plugins/check_curl.c
index a0e6d8f..cd77be3 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 */