1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/json/generator/generator.c (fbuffer_inc_capa):

fix tha use of REALLOC_N. [ruby-dev:41227]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2010-05-09 00:50:36 +00:00
parent c8892037c7
commit 7021db80f3
2 changed files with 6 additions and 1 deletions

View file

@ -1,3 +1,8 @@
Sun May 9 08:32:56 2010 NARUSE, Yui <naruse@ruby-lang.org>
* ext/json/generator/generator.c (fbuffer_inc_capa):
fix tha use of REALLOC_N. [ruby-dev:41227]
Sun May 9 09:30:09 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/json/{generator/generator.c,parser/parser.rl}: fixed indent.

View file

@ -339,7 +339,7 @@ static void fbuffer_inc_capa(FBuffer *fb, unsigned int requested)
for (required = fb->capa; requested > required - fb->len; required <<= 1);
if (required > fb->capa) {
fb->ptr = (char *) REALLOC_N((long*) fb->ptr, char, required);
REALLOC_N(fb->ptr, char, required);
fb->capa = required;
}
}