From 66124ee0d4b7677b2243c6a722eaad621d694f46 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Wed, 4 Aug 2010 14:40:04 +0200 Subject: [PATCH] curl_json plugin: Use a more descriptive define as return value. --- src/curl_json.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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) -- 2.11.0