aboutsummaryrefslogtreecommitdiffstats
path: root/string.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-29 03:06:01 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-29 03:06:01 +0000
commitc059d0b67539d8f06ae7e2b2a75a52c1a35aaca9 (patch)
tree83a1c14df11500807880afb4f65b100f875c9c02 /string.c
parent2666a1ca7a43c7ae4dfc8299e19e86ae724291d2 (diff)
downloadruby-c059d0b67539d8f06ae7e2b2a75a52c1a35aaca9.tar.gz
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
Diffstat (limited to 'string.c')
-rw-r--r--string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/string.c b/string.c
index 96115e0ce0..c007c7c69a 100644
--- a/string.c
+++ b/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;