From: Florian Forster Date: Wed, 4 Aug 2010 12:40:04 +0000 (+0200) Subject: curl_json plugin: Use a more descriptive define as return value. X-Git-Tag: collectd-4.9.4~28 X-Git-Url: https://git.octo.it/?p=collectd.git;a=commitdiff_plain;h=66124ee0d4b7677b2243c6a722eaad621d694f46 curl_json plugin: Use a more descriptive define as return value. --- diff --git a/src/curl_json.c b/src/curl_json.c index e3660258..a7acc81c 100644 --- a/src/curl_json.c +++ b/src/curl_json.c @@ -207,7 +207,7 @@ static int cj_cb_map_key (void *ctx, const unsigned char *val, db->state[db->depth].key = NULL; } - return 1; + return (CJ_CB_CONTINUE); } static int cj_cb_string (void *ctx, const unsigned char *val, @@ -218,7 +218,7 @@ static int cj_cb_string (void *ctx, const unsigned char *val, char *ptr; if (db->depth != 1) /* e.g. _all_dbs */ - return 1; + return (CJ_CB_CONTINUE); cj_cb_map_key (ctx, val, len); /* same logic */ @@ -240,7 +240,7 @@ static int cj_cb_string (void *ctx, const unsigned char *val, cj_curl_perform (db, curl); curl_easy_cleanup (curl); } - return 1; + return (CJ_CB_CONTINUE); } static int cj_cb_start (void *ctx) @@ -249,9 +249,9 @@ static int cj_cb_start (void *ctx) if (++db->depth >= YAJL_MAX_DEPTH) { ERROR ("curl_json plugin: %s depth exceeds max, aborting.", db->url); - return 0; + return (CJ_CB_ABORT); } - return 1; + return (CJ_CB_CONTINUE); } static int cj_cb_end (void *ctx) @@ -259,7 +259,7 @@ static int cj_cb_end (void *ctx) cj_t *db = (cj_t *)ctx; db->state[db->depth].tree = NULL; --db->depth; - return 1; + return (CJ_CB_CONTINUE); } static int cj_cb_start_map (void *ctx)