diff options
| author | cremno <[email protected]> | 2015-07-16 04:58:21 +0200 |
|---|---|---|
| committer | cremno <[email protected]> | 2015-07-16 04:58:21 +0200 |
| commit | 0f284091d161dbca6e07de85896cbdc9abd2de6b (patch) | |
| tree | fe737bb4403b500b2c3ccf851dfb6159533912c9 /mrbgems/mruby-bin-mrbc | |
| parent | 207577f0af72874d9d643f2c46b881a9159d42d7 (diff) | |
| download | mruby-0f284091d161dbca6e07de85896cbdc9abd2de6b.tar.gz mruby-0f284091d161dbca6e07de85896cbdc9abd2de6b.zip | |
delete mrb_free()-related non-NULL checks
No need to optimize since a program only exits once and errors are rare.
Also the mruby source code doesn't have these kind of checks elsewhere.
The ones in {Time,Random}#initialize are kept because there it actually
matters
since initialization always happens and re-initialization is unlikely.
Diffstat (limited to 'mrbgems/mruby-bin-mrbc')
| -rw-r--r-- | mrbgems/mruby-bin-mrbc/tools/mrbc/mrbc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/mrbgems/mruby-bin-mrbc/tools/mrbc/mrbc.c b/mrbgems/mruby-bin-mrbc/tools/mrbc/mrbc.c index f27f87a5d..301dde1c6 100644 --- a/mrbgems/mruby-bin-mrbc/tools/mrbc/mrbc.c +++ b/mrbgems/mruby-bin-mrbc/tools/mrbc/mrbc.c @@ -161,8 +161,7 @@ parse_args(mrb_state *mrb, int argc, char **argv, struct mrbc_args *args) static void cleanup(mrb_state *mrb, struct mrbc_args *args) { - if (args->outfile) - mrb_free(mrb, (void*)args->outfile); + mrb_free(mrb, (void*)args->outfile); mrb_close(mrb); } |
