From: Ruben Kerkhof Date: Sat, 28 Nov 2015 19:27:22 +0000 (+0100) Subject: curl_json: remove dead code X-Git-Tag: collectd-5.6.0~550^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=562c27c1d63a3540d66acae8dc1ca9a2a5ff56f1;p=collectd.git curl_json: remove dead code CID 37963 --- diff --git a/src/curl_json.c b/src/curl_json.c index 510d9b62..69d45e39 100644 --- a/src/curl_json.c +++ b/src/curl_json.c @@ -131,17 +131,11 @@ static size_t cj_curl_callback (void *buf, /* {{{ */ return (len); #endif - if (status != yajl_status_ok) - { - unsigned char *msg = - yajl_get_error(db->yajl, /* verbose = */ 1, - /* jsonText = */ (unsigned char *) buf, (unsigned int) len); - ERROR ("curl_json plugin: yajl_parse failed: %s", msg); - yajl_free_error(db->yajl, msg); - return (0); /* abort write callback */ - } - - return (len); + unsigned char *msg = yajl_get_error(db->yajl, /* verbose = */ 1, + /* jsonText = */ (unsigned char *) buf, (unsigned int) len); + ERROR ("curl_json plugin: yajl_parse failed: %s", msg); + yajl_free_error(db->yajl, msg); + return (0); /* abort write callback */ } /* }}} size_t cj_curl_callback */ static int cj_get_type (cj_key_t *key)