From 583055305424d1e99492791ddb29364d2635468c Mon Sep 17 00:00:00 2001 From: Masaki Muranaka Date: Tue, 15 Jan 2013 09:03:56 +0900 Subject: Use MRB_DUMP_OK instead of 0. --- src/dump.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/dump.c') diff --git a/src/dump.c b/src/dump.c index 2885c225a..2d70c2802 100644 --- a/src/dump.c +++ b/src/dump.c @@ -689,7 +689,7 @@ mrb_write_irep(mrb_state *mrb, int top, char *bin) for (irep_no=top; irep_noirep_len; irep_no++) { rc = write_irep_record(mrb, irep_no, bin, &rlen, DUMP_TYPE_BIN); - if (rc != 0) + if (rc != MRB_DUMP_OK) return rc; bin += (rlen + DUMP_SIZE(MRB_DUMP_SIZE_OF_LONG, DUMP_TYPE_BIN)); @@ -718,7 +718,7 @@ mrb_dump_irep(mrb_state *mrb, int top, FILE* fp) for (irep_no=top; irep_noirep_len; irep_no++) { rc = dump_irep_record(mrb, irep_no, fp, &rlen); - if (rc != 0) + if (rc != MRB_DUMP_OK) return rc; rbds += rlen; -- cgit v1.2.3 From 443f207f9e89e4433afd9586db480f05694907e3 Mon Sep 17 00:00:00 2001 From: Selman ULUG Date: Tue, 15 Jan 2013 03:08:11 +0200 Subject: silence clang warning --- src/dump.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/dump.c') diff --git a/src/dump.c b/src/dump.c index 2885c225a..409cc7ec8 100644 --- a/src/dump.c +++ b/src/dump.c @@ -507,6 +507,7 @@ calc_crc_section(mrb_state *mrb, mrb_irep *irep, uint16_t *crc, int section) result = write_syms_block(mrb, irep, buf, type); break; default: + result = MRB_DUMP_GENERAL_FAILURE; break; /* Already checked above. */ } if (result < 0) { -- cgit v1.2.3