From b90798d778c10ee358a852e4b8e69fd494bcf10f Mon Sep 17 00:00:00 2001 From: j8takagi Date: Thu, 28 Apr 2011 08:13:59 +0900 Subject: [PATCH] =?utf8?q?malloc=E3=81=AE=E3=82=B5=E3=82=A4=E3=82=BA?= =?utf8?q?=E6=8C=87=E5=AE=9A=E8=AA=A4=E3=82=8A=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/casl2.c | 2 +- src/token.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/casl2.c b/src/casl2.c index 47490a1..79d3e02 100644 --- a/src/casl2.c +++ b/src/casl2.c @@ -65,7 +65,7 @@ void assemble(int filec, char *filev[]) create_cmdtype_code(); /* 命令の名前とタイプがキーのハッシュ表を作成 */ asptr = malloc_chk(sizeof(ASPTR), "asptr"); /* アセンブル時のプロパティ用の領域確保 */ - asptr->prog = malloc_chk(sizeof(LABELSIZE + 1), "asptr.prog"); + asptr->prog = malloc_chk(LABELSIZE + 1, "asptr.prog"); asptr->ptr = 0; /* アセンブル。ラベル表作成のため、2回行う */ for(pass = FIRST; pass <= SECOND; pass++) { diff --git a/src/token.c b/src/token.c index d2242af..984fc5a 100644 --- a/src/token.c +++ b/src/token.c @@ -122,7 +122,7 @@ CMDLINE *linetok(const char *line) if(*tokens != '\n' && *tokens != '\0') { p = tokens; cmdl = malloc_chk(sizeof(CMDLINE), "cmdl"); - cmdl->label = malloc_chk(sizeof(LABELSIZE + 1), "cmdl.label"); + cmdl->label = malloc_chk(LABELSIZE + 1, "cmdl.label"); /* ラベルの取得。行の先頭が空白またはタブの場合、ラベルは空 */ if((sepp = p + strcspn(p, " \t\n")) == p){ cmdl->label = '\0'; -- 2.18.0