X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fnginx.c;h=0da66ce2e94525902008090a31d3d148fb18a51a;hb=a503c54a95d139f117650a0e6d80e6edfe81e8bf;hp=23feb1cdbb284a1339c930bee58b621de7065e50;hpb=a396da422740caf336a6d594515e8d80de6f440a;p=collectd.git diff --git a/src/nginx.c b/src/nginx.c index 23feb1cd..0da66ce2 100644 --- a/src/nginx.c +++ b/src/nginx.c @@ -28,8 +28,8 @@ #include "collectd.h" -#include "common.h" #include "plugin.h" +#include "utils/common/common.h" #include @@ -44,7 +44,7 @@ static char *timeout; static CURL *curl; static char nginx_buffer[16384]; -static size_t nginx_buffer_len = 0; +static size_t nginx_buffer_len; static char nginx_curl_error[CURL_ERROR_SIZE]; static const char *config_keys[] = { @@ -122,8 +122,8 @@ static int init(void) { curl_easy_setopt(curl, CURLOPT_PASSWORD, (pass == NULL) ? "" : pass); #else static char credentials[1024]; - int status = snprintf(credentials, sizeof(credentials), "%s:%s", user, - pass == NULL ? "" : pass); + int status = ssnprintf(credentials, sizeof(credentials), "%s:%s", user, + pass == NULL ? "" : pass); if ((status < 0) || ((size_t)status >= sizeof(credentials))) { ERROR("nginx plugin: Credentials would have been truncated."); return -1;