From 482a44cb5af1ce72d3a56216bc2ea06160cb7bd7 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Fri, 19 Jun 2015 16:12:22 -0700 Subject: [PATCH] Fixed incorrect functional change --- src/core/json/json_string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/json/json_string.c b/src/core/json/json_string.c index 785ec50411e..03c1099167e 100644 --- a/src/core/json/json_string.c +++ b/src/core/json/json_string.c @@ -83,7 +83,7 @@ static void json_writer_output_check(void* userdata, size_t needed) { if (state->free_space >= needed) return; needed -= state->free_space; /* Round up by 256 bytes. */ - needed = (needed + 0xff) % 0x100; + needed = (needed + 0xff) & ~0xffU; state->output = gpr_realloc(state->output, state->allocated + needed); state->free_space += needed; state->allocated += needed;