From 562c27c1d63a3540d66acae8dc1ca9a2a5ff56f1 Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Sat, 28 Nov 2015 20:27:22 +0100 Subject: [PATCH] curl_json: remove dead code CID 37963 --- src/curl_json.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) 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) -- 2.11.0