mirror of
https://github.com/json-c/json-c.git
synced 2026-03-24 07:29:07 +08:00
Apply some of the fixes from PR #740, although by using size_t instead of castings.
This commit is contained in:
@@ -38,7 +38,7 @@ static void do_clear_serializer(json_object *jso);
|
||||
|
||||
static void single_incremental_parse(const char *test_string, int clear_serializer)
|
||||
{
|
||||
int ii;
|
||||
size_t ii;
|
||||
int chunksize = atoi(getenv("TEST_PARSE_CHUNKSIZE"));
|
||||
struct json_tokener *tok;
|
||||
enum json_tokener_error jerr;
|
||||
@@ -53,7 +53,7 @@ static void single_incremental_parse(const char *test_string, int clear_serializ
|
||||
all_at_once_str = json_object_to_json_string(all_at_once_obj);
|
||||
|
||||
tok = json_tokener_new();
|
||||
int test_string_len = strlen(test_string) + 1; // Including '\0' !
|
||||
size_t test_string_len = strlen(test_string) + 1; // Including '\0' !
|
||||
for (ii = 0; ii < test_string_len; ii += chunksize)
|
||||
{
|
||||
int len_to_parse = chunksize;
|
||||
|
||||
Reference in New Issue
Block a user