Code

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 79ae68fced0293ef392fa777385d022d3e9fb0e0..b19730b855a47706be9313740dc685cd4e1ac133 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;