summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2017-04-15 12:36:24 (GMT)
committerAndreas Baumann <mail@andreasbaumann.cc>2017-04-15 12:36:24 (GMT)
commit2b22408b1f782f3484092458957652b01166c090 (patch)
tree107a4313f617aba751890d37274cb58136b01257
parentf827df482be8cec9d6c9dee023ebf9191b890b9c (diff)
downloadmonitoring-plugins-2b22408.tar.gz
fixed non-C99-ism in get_header_value
-rw-r--r--plugins/check_curl.c3
1 files changed, 2 insertions, 1 deletions
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)
1396char * 1396char *
1397get_header_value (const struct phr_header* headers, const size_t nof_headers, const char* header) 1397get_header_value (const struct phr_header* headers, const size_t nof_headers, const char* header)
1398{ 1398{
1399 for( int i = 0; i < nof_headers; i++ ) { 1399 int i;
1400 for( i = 0; i < nof_headers; i++ ) {
1400 if( strncasecmp( header, headers[i].name, max( headers[i].name_len, 4 ) ) == 0 ) { 1401 if( strncasecmp( header, headers[i].name, max( headers[i].name_len, 4 ) ) == 0 ) {
1401 return strndup( headers[i].value, headers[i].value_len ); 1402 return strndup( headers[i].value, headers[i].value_len );
1402 } 1403 }