summaryrefslogtreecommitdiffhomepage
path: root/src/parse.y
diff options
context:
space:
mode:
authorMasaki Muranaka <[email protected]>2012-07-08 11:33:49 +0900
committerMasaki Muranaka <[email protected]>2012-07-08 11:33:49 +0900
commit611cf71a10051d77a7bb8998d8a7c34e26b0b1b0 (patch)
tree023f6c954653c02b27ef1e8d1a04afd8b36cc83e /src/parse.y
parent15ac09f884da0669e2d7a90dc4c02aebd3fa29de (diff)
downloadmruby-611cf71a10051d77a7bb8998d8a7c34e26b0b1b0.tar.gz
mruby-611cf71a10051d77a7bb8998d8a7c34e26b0b1b0.zip
Use mrb_calloc if you want zero cleard buffers.
Diffstat (limited to 'src/parse.y')
-rw-r--r--src/parse.y3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/parse.y b/src/parse.y
index af91f09b6..dd1738010 100644
--- a/src/parse.y
+++ b/src/parse.y
@@ -4792,8 +4792,7 @@ mrbc_context_new(mrb_state *mrb)
{
mrbc_context *c;
- c = mrb_malloc(mrb, sizeof(mrbc_context));
- memset(c, 0, sizeof(mrbc_context));
+ c = mrb_calloc(mrb, 1, sizeof(mrbc_context));
return c;
}