mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Remove redundant NULL checks.
mrb_malloc causes an exception when memory was empty.
This commit is contained in:
+4
-5
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user