diff options
| author | Masaki Muranaka <[email protected]> | 2014-03-26 11:13:42 +0900 |
|---|---|---|
| committer | Masaki Muranaka <[email protected]> | 2014-03-26 11:21:20 +0900 |
| commit | dcff9012e379ea89342d175ed36847aa8cc0d106 (patch) | |
| tree | 11fb655db9b4fc8ad09c2fba057711f5eeab4090 /src/state.c | |
| parent | 2bf718faf86001c30032cbff152c154135577a54 (diff) | |
| download | mruby-dcff9012e379ea89342d175ed36847aa8cc0d106.tar.gz mruby-dcff9012e379ea89342d175ed36847aa8cc0d106.zip | |
Remove redundant NULL checks.
mrb_malloc causes an exception when memory was empty.
Diffstat (limited to 'src/state.c')
| -rw-r--r-- | src/state.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/state.c b/src/state.c index f05dbda34..eeb466e0c 100644 --- a/src/state.c +++ b/src/state.c @@ -78,7 +78,6 @@ mrb_alloca(mrb_state *mrb, size_t size) struct alloca_header *p; p = (struct alloca_header*) mrb_malloc(mrb, sizeof(struct alloca_header)+size); - if (p == NULL) return NULL; p->next = mrb->mems; mrb->mems = p; return (void*)p->buf; |
