diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2012-10-29 23:28:53 -0700 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2012-10-29 23:28:53 -0700 |
| commit | 0e722add6f206042c06ee603ca2499c8a17ef58f (patch) | |
| tree | 11c227532cddd5e992d7cf05ebd6d538f3939564 /src/cdump.c | |
| parent | 509dbf9be8d65e855d0de304442be27b8b60d36b (diff) | |
| parent | 30f7a93d415722ec070447d573355b2c67d71310 (diff) | |
| download | mruby-0e722add6f206042c06ee603ca2499c8a17ef58f.tar.gz mruby-0e722add6f206042c06ee603ca2499c8a17ef58f.zip | |
Merge pull request #516 from monaka/pr-use-null-macro-instead-zero
Use NULL instead of 0.
Diffstat (limited to 'src/cdump.c')
| -rw-r--r-- | src/cdump.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/cdump.c b/src/cdump.c index c7597e12f..b43c86ee7 100644 --- a/src/cdump.c +++ b/src/cdump.c @@ -22,7 +22,7 @@ make_cdump_isec(mrb_state *mrb, int irep_no, FILE *f) int i; mrb_irep *irep = mrb->irep[irep_no]; - if (irep == 0) + if (irep == NULL) return -1; /* dump isec struct*/ @@ -103,11 +103,11 @@ make_cdump_irep(mrb_state *mrb, int irep_no, FILE *f) char *buf = 0; size_t buf_len, str_len; - if (irep == 0) + if (irep == NULL) return -1; buf_len = MRB_CDUMP_LINE_LEN; - if ((buf = (char *)mrb_malloc(mrb, buf_len)) == 0 ) { + if ((buf = (char *)mrb_malloc(mrb, buf_len)) == NULL) { return MRB_CDUMP_GENERAL_FAILURE; } @@ -150,7 +150,7 @@ make_cdump_irep(mrb_state *mrb, int irep_no, FILE *f) str_len = str_format_len(irep->pool[n]) + 1; if ( str_len > buf_len ) { buf_len = str_len; - if ((buf = (char *)mrb_realloc(mrb, buf, buf_len)) == 0 ) { + if ((buf = (char *)mrb_realloc(mrb, buf, buf_len)) == NULL) { return MRB_CDUMP_GENERAL_FAILURE; } } @@ -174,7 +174,7 @@ mrb_cdump_irep(mrb_state *mrb, int n, FILE *f,const char *initname) { int irep_no, irep_num; - if (mrb == 0 || n < 0 || n >= mrb->irep_len || f == 0 || initname == 0) + if (mrb == NULL || n < 0 || n >= mrb->irep_len || f == NULL || initname == NULL) return -1; irep_num = mrb->irep_len - n; |
