From: Ruben Kerkhof Date: Sat, 23 Apr 2016 08:50:48 +0000 (+0200) Subject: nginx plugin: len is unsigned X-Git-Tag: collectd-5.6.0~329^2~32 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=1e924f8fbd8f1ff598ffacd36385364f65469a86;p=collectd.git nginx plugin: len is unsigned [src/nginx.c:74]: (style) Checking if unsigned variable 'len' is less than zero. --- diff --git a/src/nginx.c b/src/nginx.c index e493cc94..7587c1f9 100644 --- a/src/nginx.c +++ b/src/nginx.c @@ -71,7 +71,7 @@ static size_t nginx_curl_callback (void *buf, size_t size, size_t nmemb, len = (sizeof (nginx_buffer) - 1) - nginx_buffer_len; } - if (len <= 0) + if (len == 0) return (len); memcpy (&nginx_buffer[nginx_buffer_len], buf, len);