[monitoring-plugins] fixed non-C99-ism in get_header_value

Andreas Baumann git at monitoring-plugins.org
Sat Apr 15 14:40:11 CEST 2017


 Module: monitoring-plugins
 Branch: feature_check_curl
 Commit: 2b22408b1f782f3484092458957652b01166c090
 Author: Andreas Baumann <mail at andreasbaumann.cc>
   Date: Sat Apr 15 14:36:24 2017 +0200
    URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=2b22408

fixed non-C99-ism in get_header_value

---

 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 7576b2d..08327e6 100644
--- a/plugins/check_curl.c
+++ b/plugins/check_curl.c
@@ -1396,7 +1396,8 @@ perfd_time_ssl (double elapsed_time_ssl)
 char *
 get_header_value (const struct phr_header* headers, const size_t nof_headers, const char* header)
 {
-  for( int i = 0; i < nof_headers; i++ ) {
+  int i;
+  for( i = 0; i < nof_headers; i++ ) {
     if( strncasecmp( header, headers[i].name, max( headers[i].name_len, 4 ) ) == 0 ) {
       return strndup( headers[i].value, headers[i].value_len );
     }



More information about the Commits mailing list