diff options
| author | Tatsuhiko Kubo <[email protected]> | 2014-08-20 04:34:03 +0900 |
|---|---|---|
| committer | Tatsuhiko Kubo <[email protected]> | 2014-08-20 04:34:03 +0900 |
| commit | ae306793f231309c12661b111535de6613d5a774 (patch) | |
| tree | d5096259dc5e8329d1ebe9ba75789100c8b4c1e4 /src/parse.y | |
| parent | d49f8517a6d2350eb1ed2642749f3994a9a2d056 (diff) | |
| download | mruby-ae306793f231309c12661b111535de6613d5a774.tar.gz mruby-ae306793f231309c12661b111535de6613d5a774.zip | |
Use specified macro(NULL) instead of magic-number.
Diffstat (limited to 'src/parse.y')
| -rw-r--r-- | src/parse.y | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/parse.y b/src/parse.y index 633d92ad3..03333e808 100644 --- a/src/parse.y +++ b/src/parse.y @@ -5365,9 +5365,9 @@ mrb_parser_new(mrb_state *mrb) static const parser_state parser_state_zero = { 0 }; pool = mrb_pool_open(mrb); - if (!pool) return 0; + if (!pool) return NULL; p = (parser_state *)mrb_pool_alloc(pool, sizeof(parser_state)); - if (!p) return 0; + if (!p) return NULL; *p = parser_state_zero; p->mrb = mrb; @@ -5483,7 +5483,7 @@ mrb_parse_file(mrb_state *mrb, FILE *f, mrbc_context *c) parser_state *p; p = mrb_parser_new(mrb); - if (!p) return 0; + if (!p) return NULL; p->s = p->send = NULL; p->f = f; @@ -5498,7 +5498,7 @@ mrb_parse_nstring(mrb_state *mrb, const char *s, int len, mrbc_context *c) parser_state *p; p = mrb_parser_new(mrb); - if (!p) return 0; + if (!p) return NULL; p->s = s; p->send = s + len; |
