mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
string.c: use xmalloc
* string.c (rb_str_casemap): use xmalloc simply instead of ALLOC_N. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
7242e6a9b6
commit
07fb750fd0
1 changed files with 1 additions and 1 deletions
2
string.c
2
string.c
|
@ -5923,7 +5923,7 @@ rb_str_casemap(VALUE source, OnigCaseFoldType *flags, rb_encoding *enc)
|
|||
if (CASEMAP_DEBUG) {
|
||||
fprintf(stderr, "Buffer allocation, capa is %"PRIuSIZE"\n", capa); /* for tuning */
|
||||
}
|
||||
current_buffer->next = (mapping_buffer*)ALLOC_N(char, offsetof(mapping_buffer, space)+capa);
|
||||
current_buffer->next = xmalloc(offsetof(mapping_buffer, space) + capa);
|
||||
current_buffer = current_buffer->next;
|
||||
current_buffer->next = NULL;
|
||||
current_buffer->capa = capa;
|
||||
|
|
Loading…
Reference in a new issue