[monitoring-plugins] check_curl: code cleanup

Sven Nierlein git at monitoring-plugins.org
Wed Oct 24 14:50:16 CEST 2018


 Module: monitoring-plugins
 Branch: feature_check_curl
 Commit: ec590af49fa3498db52a118a519d8fcafd0b00ad
 Author: Sven Nierlein <sven at nierlein.de>
   Date: Wed Oct 24 13:36:47 2018 +0200
    URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=ec590af

check_curl: code cleanup

---

 plugins/check_curl.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/plugins/check_curl.c b/plugins/check_curl.c
index cbf21ed..4d37891 100644
--- a/plugins/check_curl.c
+++ b/plugins/check_curl.c
@@ -481,7 +481,7 @@ check_http (void)
   ssl_library = curlhelp_get_ssl_library (curl);
 
   /* try hard to get a stack of certificates to verify against */
-  if (check_cert)
+  if (check_cert) {
 #if LIBCURL_VERSION_NUM >= MAKE_LIBCURL_VERSION(7, 19, 1)
     /* inform curl to report back certificates */
     switch (ssl_library) {
@@ -530,6 +530,7 @@ check_http (void)
     else
       die (STATE_CRITICAL, "HTTP CRITICAL - Cannot retrieve certificates (no CURLOPT_SSL_CTX_FUNCTION, no OpenSSL library or libcurl too old and has no CURLOPT_CERTINFO)\n");
 #endif /* LIBCURL_VERSION_NUM >= MAKE_LIBCURL_VERSION(7, 19, 1) */
+  }
 
 #endif /* LIBCURL_FEATURE_SSL */
 



More information about the Commits mailing list