diff options
| author | Yukihiro Matsumoto <[email protected]> | 2012-05-23 03:31:55 +0900 |
|---|---|---|
| committer | Yukihiro Matsumoto <[email protected]> | 2012-05-23 03:31:55 +0900 |
| commit | 4523bee95357bed945a58462544441371160056f (patch) | |
| tree | fc7fecb95769eee94f1596b13eb58472281ec656 /src/dump.c | |
| parent | 714b358bb22c99bf653e21f4f9f6e22e24134b28 (diff) | |
| download | mruby-4523bee95357bed945a58462544441371160056f.tar.gz mruby-4523bee95357bed945a58462544441371160056f.zip | |
cast style consistency
Diffstat (limited to 'src/dump.c')
| -rw-r--r-- | src/dump.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/dump.c b/src/dump.c index 1771a061c..f3cbef3a0 100644 --- a/src/dump.c +++ b/src/dump.c @@ -467,7 +467,7 @@ calc_crc_section(mrb_state *mrb, mrb_irep *irep, uint16_t *crc, int section) default: break; } - *crc = calc_crc_16_ccitt((unsigned char *)buf_top, (int)(buf - buf_top)); + *crc = calc_crc_16_ccitt((unsigned char*)buf_top, (int)(buf - buf_top)); mrb_free(mrb, buf_top); @@ -481,15 +481,15 @@ write_rite_header(mrb_state *mrb, int top, char* bin, uint32_t rbds) uint16_t crc; int type = DUMP_TYPE_BIN; - binary_header = (rite_binary_header *)bin; + binary_header = (rite_binary_header*)bin; memcpy( binary_header, def_rite_binary_header, sizeof(*binary_header)); - uint32_dump(rbds, (char *)binary_header->rbds, type); - uint16_dump((uint16_t)mrb->irep_len, (char *)binary_header->nirep, type); - uint16_dump((uint16_t)top, (char *)binary_header->sirep, type); + uint32_dump(rbds, (char*)binary_header->rbds, type); + uint16_dump((uint16_t)mrb->irep_len, (char*)binary_header->nirep, type); + uint16_dump((uint16_t)top, (char*)binary_header->sirep, type); - crc = calc_crc_16_ccitt((unsigned char *)binary_header, sizeof(*binary_header)); + crc = calc_crc_16_ccitt((unsigned char*)binary_header, sizeof(*binary_header)); bin += sizeof(*binary_header); uint16_dump(crc, bin, type); @@ -511,20 +511,20 @@ dump_rite_header(mrb_state *mrb, int top, FILE* fp, uint32_t rbds) memcpy( &binary_header, def_rite_binary_header, sizeof(binary_header)); type = DUMP_TYPE_BIN; - uint32_dump(rbds, (char *)&binary_header.rbds, type); - uint16_dump((uint16_t)mrb->irep_len, (char *)&binary_header.nirep, type); - uint16_dump((uint16_t)top, (char *)&binary_header.sirep, type); + uint32_dump(rbds, (char*)&binary_header.rbds, type); + uint16_dump((uint16_t)mrb->irep_len, (char*)&binary_header.nirep, type); + uint16_dump((uint16_t)top, (char*)&binary_header.sirep, type); - crc = calc_crc_16_ccitt((unsigned char *)&binary_header, sizeof(binary_header)); + crc = calc_crc_16_ccitt((unsigned char*)&binary_header, sizeof(binary_header)); /* dump rbc header */ memcpy( &file_header, def_rite_file_header, sizeof(file_header)); type = DUMP_TYPE_HEX; - uint32_dump(rbds, (char *)&file_header.rbds, type); - uint16_dump((uint16_t)mrb->irep_len, (char *)&file_header.nirep, type); - uint16_dump((uint16_t)top, (char *)&file_header.sirep, type); - uint16_dump(crc, (char *)&file_header.hcrc, type); + uint32_dump(rbds, (char*)&file_header.rbds, type); + uint16_dump((uint16_t)mrb->irep_len, (char*)&file_header.nirep, type); + uint16_dump((uint16_t)top, (char*)&file_header.sirep, type); + uint16_dump(crc, (char*)&file_header.hcrc, type); if (fwrite(&file_header, sizeof(file_header), 1, fp) != 1) return MRB_DUMP_WRITE_FAULT; |
