From: Ruben Kerkhof Date: Sat, 28 Nov 2015 19:27:22 +0000 (+0100) Subject: curl_json: remove dead code X-Git-Tag: collectd-5.5.1~7^2~4 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=fb9883b5bcf5e40e2a32e47edf5561518adef0b1;p=collectd.git curl_json: remove dead code CID 37963 --- diff --git a/src/curl_json.c b/src/curl_json.c index 5875feae..6b8449c9 100644 --- a/src/curl_json.c +++ b/src/curl_json.c @@ -129,17 +129,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)