summaryrefslogtreecommitdiffhomepage
path: root/src/variable.c
diff options
context:
space:
mode:
authorMasaki Muranaka <[email protected]>2014-03-26 11:13:42 +0900
committerMasaki Muranaka <[email protected]>2014-03-26 11:21:20 +0900
commitdcff9012e379ea89342d175ed36847aa8cc0d106 (patch)
tree11fb655db9b4fc8ad09c2fba057711f5eeab4090 /src/variable.c
parent2bf718faf86001c30032cbff152c154135577a54 (diff)
downloadmruby-dcff9012e379ea89342d175ed36847aa8cc0d106.tar.gz
mruby-dcff9012e379ea89342d175ed36847aa8cc0d106.zip
Remove redundant NULL checks.
mrb_malloc causes an exception when memory was empty.
Diffstat (limited to 'src/variable.c')
-rw-r--r--src/variable.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/variable.c b/src/variable.c
index 8e427829a..1d10ddb49 100644
--- a/src/variable.c
+++ b/src/variable.c
@@ -46,11 +46,10 @@ iv_new(mrb_state *mrb)
iv_tbl *t;
t = mrb_malloc(mrb, sizeof(iv_tbl));
- if (t) {
- t->size = 0;
- t->rootseg = NULL;
- t->last_len = 0;
- }
+ t->size = 0;
+ t->rootseg = NULL;
+ t->last_len = 0;
+
return t;
}