curl_json plugin: len is unsigned
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Sat, 23 Apr 2016 10:06:38 +0000 (12:06 +0200)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Sat, 23 Apr 2016 10:06:38 +0000 (12:06 +0200)
[src/curl_json.c:119]: (style) Checking if unsigned variable 'len' is less than zero.

src/curl_json.c

index 79ae68f..b19730b 100644 (file)
@@ -116,7 +116,7 @@ static size_t cj_curl_callback (void *buf, /* {{{ */
 
   len = size * nmemb;
 
-  if (len <= 0)
+  if (len == 0)
     return (len);
 
   db = user_data;