From: Ruben Kerkhof Date: Sat, 23 Apr 2016 10:13:21 +0000 (+0200) Subject: apache plugin: len is unsigned X-Git-Tag: collectd-5.6.0~329^2~1 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=fdf8a2725fab0a1b6cfa26f453fcb306dd1ab05e;p=collectd.git apache plugin: len is unsigned [src/apache.c:140]: (style) Checking if unsigned variable 'len' is less than zero. --- diff --git a/src/apache.c b/src/apache.c index baa6081a..0db53286 100644 --- a/src/apache.c +++ b/src/apache.c @@ -98,7 +98,7 @@ static size_t apache_curl_callback (void *buf, size_t size, size_t nmemb, return (0); } - if (len <= 0) + if (len == 0) return (len); if ((st->apache_buffer_fill + len) >= st->apache_buffer_size) @@ -137,7 +137,7 @@ static size_t apache_header_callback (void *buf, size_t size, size_t nmemb, return (0); } - if (len <= 0) + if (len == 0) return (len); /* look for the Server header */