diff options
Diffstat (limited to 'strings/json_lib.c')
-rw-r--r-- | strings/json_lib.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/strings/json_lib.c b/strings/json_lib.c index f451b12aa61..b2d5987fa5b 100644 --- a/strings/json_lib.c +++ b/strings/json_lib.c @@ -1640,7 +1640,7 @@ int json_escape(CHARSET_INFO *str_cs, if (c_len < 0) { /* JSON buffer is depleted. */ - return -1; + return JSON_ERROR_OUT_OF_SPACE; } /* JSON charset cannot convert this character. */ @@ -1652,7 +1652,7 @@ int json_escape(CHARSET_INFO *str_cs, json+= c_len, json_end)) <= 0) { /* JSON buffer is depleted. */ - return -1; + return JSON_ERROR_OUT_OF_SPACE; } json+= c_len; @@ -1685,11 +1685,11 @@ int json_escape(CHARSET_INFO *str_cs, continue; } /* JSON buffer is depleted. */ - return -1; + return JSON_ERROR_OUT_OF_SPACE; } } else /* c_len == 0, an illegal symbol. */ - return -1; + return JSON_ERROR_ILLEGAL_SYMBOL; } return (int)(json - json_start); |