summaryrefslogtreecommitdiffhomepage
path: root/src/dump.c
diff options
context:
space:
mode:
authorMasaki Muranaka <[email protected]>2012-10-22 11:21:04 +0900
committerMasaki Muranaka <[email protected]>2012-10-22 11:21:04 +0900
commitdd10048094b3fa9a53b1385bd16ffcc07d35e1a6 (patch)
treec0c8355091dd95cc280ba9ebd345b77f5a6392e6 /src/dump.c
parentfed285d1945d1fa3104b441cf51db2d7118a5d01 (diff)
downloadmruby-dd10048094b3fa9a53b1385bd16ffcc07d35e1a6.tar.gz
mruby-dd10048094b3fa9a53b1385bd16ffcc07d35e1a6.zip
Remove redundant sizeof(char). "Always sizeof(char) == 1" is described in ISO C specs.
Diffstat (limited to 'src/dump.c')
-rw-r--r--src/dump.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dump.c b/src/dump.c
index e7e1a4807..c18362233 100644
--- a/src/dump.c
+++ b/src/dump.c
@@ -188,7 +188,7 @@ get_irep_header_size(mrb_state *mrb, mrb_irep *irep, int type)
{
uint32_t size = 0;
- size += sizeof(char) * 2;
+ size += 2;
size += DUMP_SIZE(MRB_DUMP_SIZE_OF_SHORT, type) * 4;
return size;
@@ -215,7 +215,7 @@ get_pool_block_size(mrb_state *mrb, mrb_irep *irep, int type)
char buf[32];
size += MRB_DUMP_SIZE_OF_LONG; /* plen */
- size += irep->plen * sizeof(char); /* tt(n) */
+ size += irep->plen; /* tt(n) */
size += irep->plen * MRB_DUMP_SIZE_OF_SHORT; /* len(n) */
size += MRB_DUMP_SIZE_OF_SHORT; /* crc */
size = DUMP_SIZE(size, type);