diff options
| author | Tatsuhiko Kubo <[email protected]> | 2015-01-01 05:12:41 +0900 |
|---|---|---|
| committer | Tatsuhiko Kubo <[email protected]> | 2015-01-01 05:12:41 +0900 |
| commit | 606095f2fe955f61aea88cd2e7ed9a6387eecaac (patch) | |
| tree | 45718b550f362c8cf996152f6700e0da51472bce /mrbgems/mruby-bin-debugger/tools/mrdb/apibreak.c | |
| parent | 4046368ef34e9062dee406ae986961010ffb313f (diff) | |
| download | mruby-606095f2fe955f61aea88cd2e7ed9a6387eecaac.tar.gz mruby-606095f2fe955f61aea88cd2e7ed9a6387eecaac.zip | |
Remove redundant NULL checks for mrb_malloc().
Diffstat (limited to 'mrbgems/mruby-bin-debugger/tools/mrdb/apibreak.c')
| -rwxr-xr-x | mrbgems/mruby-bin-debugger/tools/mrdb/apibreak.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/mrbgems/mruby-bin-debugger/tools/mrdb/apibreak.c b/mrbgems/mruby-bin-debugger/tools/mrdb/apibreak.c index f1bf34a06..610a5db6f 100755 --- a/mrbgems/mruby-bin-debugger/tools/mrdb/apibreak.c +++ b/mrbgems/mruby-bin-debugger/tools/mrdb/apibreak.c @@ -203,9 +203,6 @@ mrb_debug_set_break_line( mrb_state *mrb, mrb_debug_context *dbg, const char *fi } set_file = mrb_malloc(mrb, strlen(file) + 1); - if(set_file == NULL) { - return MRB_DEBUG_NOBUF; - } index = dbg->bpnum; dbg->bp[index].bpno = dbg->next_bpno; @@ -243,10 +240,6 @@ mrb_debug_set_break_method( mrb_state *mrb, mrb_debug_context *dbg, const char * if(class_name != NULL) { set_class = mrb_malloc(mrb, strlen(class_name) + 1); - if(set_class == NULL) { - return MRB_DEBUG_NOBUF; - } - strncpy(set_class, class_name, strlen(class_name) + 1); } else { @@ -254,12 +247,6 @@ mrb_debug_set_break_method( mrb_state *mrb, mrb_debug_context *dbg, const char * } set_method = mrb_malloc(mrb, strlen(method_name) + 1); - if(set_method == NULL) { - if(set_class != NULL) { - mrb_free(mrb, (void*)set_class); - } - return MRB_DEBUG_NOBUF; - } strncpy(set_method, method_name, strlen(method_name) + 1); |
