summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/check_curl.c5
-rw-r--r--plugins/check_http.c1
-rw-r--r--plugins/runcmd.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/plugins/check_curl.c b/plugins/check_curl.c
index be5740d..100a97a 100644
--- a/plugins/check_curl.c
+++ b/plugins/check_curl.c
@@ -2217,11 +2217,10 @@ curlhelp_parse_statusline (const char *buf, curlhelp_statusline *status_line)
2217 if( strchr( p, '.' ) != NULL ) { 2217 if( strchr( p, '.' ) != NULL ) {
2218 2218
2219 /* HTTP 1.x case */ 2219 /* HTTP 1.x case */
2220 char *ppp; 2220 strtok( p, "." );
2221 ppp = strtok( p, "." );
2222 status_line->http_major = (int)strtol( p, &pp, 10 ); 2221 status_line->http_major = (int)strtol( p, &pp, 10 );
2223 if( *pp != '\0' ) { free( first_line_buf ); return -1; } 2222 if( *pp != '\0' ) { free( first_line_buf ); return -1; }
2224 ppp = strtok( NULL, " " ); 2223 strtok( NULL, " " );
2225 status_line->http_minor = (int)strtol( p, &pp, 10 ); 2224 status_line->http_minor = (int)strtol( p, &pp, 10 );
2226 if( *pp != '\0' ) { free( first_line_buf ); return -1; } 2225 if( *pp != '\0' ) { free( first_line_buf ); return -1; }
2227 p += 4; /* 1.x SP */ 2226 p += 4; /* 1.x SP */
diff --git a/plugins/check_http.c b/plugins/check_http.c
index 8c03bc8..6956a72 100644
--- a/plugins/check_http.c
+++ b/plugins/check_http.c
@@ -1391,7 +1391,6 @@ char *unchunk_content(const char *content) {
1391 // https://en.wikipedia.org/wiki/Chunked_transfer_encoding 1391 // https://en.wikipedia.org/wiki/Chunked_transfer_encoding
1392 // https://www.rfc-editor.org/rfc/rfc7230#section-4.1 1392 // https://www.rfc-editor.org/rfc/rfc7230#section-4.1
1393 char *result = NULL; 1393 char *result = NULL;
1394 size_t content_length = strlen(content);
1395 char *start_of_chunk; 1394 char *start_of_chunk;
1396 char* end_of_chunk; 1395 char* end_of_chunk;
1397 long size_of_chunk; 1396 long size_of_chunk;
diff --git a/plugins/runcmd.c b/plugins/runcmd.c
index 1bd2ca1..c1d675d 100644
--- a/plugins/runcmd.c
+++ b/plugins/runcmd.c
@@ -44,6 +44,8 @@
44# include <sys/wait.h> 44# include <sys/wait.h>
45#endif 45#endif
46 46
47#include "./utils.h"
48
47/** macros **/ 49/** macros **/
48#ifndef WEXITSTATUS 50#ifndef WEXITSTATUS
49# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) 51# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)