From dcff9012e379ea89342d175ed36847aa8cc0d106 Mon Sep 17 00:00:00 2001 From: Masaki Muranaka Date: Wed, 26 Mar 2014 11:13:42 +0900 Subject: Remove redundant NULL checks. mrb_malloc causes an exception when memory was empty. --- src/state.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src/state.c') 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; -- cgit v1.2.3