[monitoring-plugins] added some casts for curl write functions

Sven Nierlein git at monitoring-plugins.org
Wed Mar 15 09:20:13 CET 2017


    Module: monitoring-plugins
    Branch: feature_check_curl
    Commit: 6c9086a35eb8e8283a2fd113918ee0016681f7b7
    Author: Andreas Baumann <mail at andreasbaumann.cc>
 Committer: Sven Nierlein <sven at nierlein.de>
      Date: Sun Jan 22 10:02:55 2017 +0100
       URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=6c9086a

added some casts for curl write functions

---

 plugins/check_curl.c | 4 ++--
 1 file 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)
   /* initialize buffer for body of the answer */
   if (curlhelp_initbuffer(&body_buf) < 0)
     die (STATE_UNKNOWN, "HTTP CRITICAL - out of memory allocating buffer for body\n");
-  curl_easy_setopt (curl, CURLOPT_WRITEFUNCTION, curlhelp_buffer_callback);
+  curl_easy_setopt (curl, CURLOPT_WRITEFUNCTION, (curl_write_callback)curlhelp_buffer_callback);
   curl_easy_setopt (curl, CURLOPT_WRITEDATA, (void *)&body_buf);
 
   /* initialize buffer for header of the answer */
   if (curlhelp_initbuffer( &header_buf ) < 0)
     die (STATE_UNKNOWN, "HTTP CRITICAL - out of memory allocating buffer for header\n" );
-  curl_easy_setopt (curl, CURLOPT_HEADERFUNCTION, curlhelp_buffer_callback);
+  curl_easy_setopt (curl, CURLOPT_HEADERFUNCTION, (curl_write_callback)curlhelp_buffer_callback);
   curl_easy_setopt (curl, CURLOPT_WRITEHEADER, (void *)&header_buf);
 
   /* set the error buffer */



More information about the Commits mailing list