Commit 37d2690d authored by Jun Hiroe's avatar Jun Hiroe

Refactor read_lineno_record_1() in load.c

parent 5921dd19
...@@ -191,12 +191,10 @@ read_section_irep(mrb_state *mrb, const uint8_t *bin, mrb_bool alloc) ...@@ -191,12 +191,10 @@ read_section_irep(mrb_state *mrb, const uint8_t *bin, mrb_bool alloc)
static int static int
read_lineno_record_1(mrb_state *mrb, const uint8_t *bin, mrb_irep *irep, size_t *len) read_lineno_record_1(mrb_state *mrb, const uint8_t *bin, mrb_irep *irep, size_t *len)
{ {
int ret;
size_t i, fname_len, niseq; size_t i, fname_len, niseq;
char *fname; char *fname;
uint16_t *lines; uint16_t *lines;
ret = MRB_DUMP_OK;
*len = 0; *len = 0;
bin += sizeof(uint32_t); /* record size */ bin += sizeof(uint32_t); /* record size */
*len += sizeof(uint32_t); *len += sizeof(uint32_t);
...@@ -228,7 +226,7 @@ read_lineno_record_1(mrb_state *mrb, const uint8_t *bin, mrb_irep *irep, size_t ...@@ -228,7 +226,7 @@ read_lineno_record_1(mrb_state *mrb, const uint8_t *bin, mrb_irep *irep, size_t
irep->filename = fname; irep->filename = fname;
irep->lines = lines; irep->lines = lines;
return ret; return MRB_DUMP_OK;
} }
static int static int
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment