From 275f8f4581bb76e8914ecdb7acd92bacfa41be3f Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Fri, 13 Jan 2017 19:48:18 +0100 Subject: small conversion fixes around strtol and an uninitialized curl code --- src/check_curl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/check_curl.c') diff --git a/src/check_curl.c b/src/check_curl.c index a9bf445..992cbf1 100644 --- a/src/check_curl.c +++ b/src/check_curl.c @@ -293,6 +293,7 @@ int main( int argc, char *argv[] ) { } if( strcmp( protocol, "http" ) == 0 ) { + curl_easy_getinfo( curl, CURLINFO_RESPONSE_CODE, &code ); /* get status line of answer, check sanity of HTTP code */ if( curlhelp_parse_statusline( header_buf.buf, &status_line ) < 0 ) { printf( "HTTP CRITICAL HTTP/1.x %ld unknown - Unparseable status line in %.3g seconds response time|%s\n", @@ -303,7 +304,6 @@ int main( int argc, char *argv[] ) { curlhelp_freebuffer( &header_buf ); exit( STATE_CRITICAL ); } - curl_easy_getinfo( curl, CURLINFO_RESPONSE_CODE, &code ); if( args_info.onredirect_given ) { if( strcmp( args_info.onredirect_arg, "follow" ) == 0 ) { code = status_line.http_code; -- cgit v1.2.3-54-g00ecf