From 611cf71a10051d77a7bb8998d8a7c34e26b0b1b0 Mon Sep 17 00:00:00 2001 From: Masaki Muranaka Date: Sun, 8 Jul 2012 11:33:49 +0900 Subject: Use mrb_calloc if you want zero cleard buffers. --- src/parse.y | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/parse.y') 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; } -- cgit v1.2.3