From: j8takagi Date: Fri, 26 Feb 2010 15:39:00 +0000 (+0900) Subject: 微修正 X-Git-Tag: v0.1~12 X-Git-Url: https://j8takagi.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=93cee61e8fc0ddfb3f23469ad840f3e77067eb48;p=YACASL2.git 微修正 --- diff --git a/src/assemble.c b/src/assemble.c index aedbb11..9fbfa96 100644 --- a/src/assemble.c +++ b/src/assemble.c @@ -421,7 +421,7 @@ bool assemble(const char *file, PASS pass) } for(; ;) { cmdl = malloc(sizeof(CMDLINE)); - line = malloc(LINESIZE+1); + line = malloc(LINESIZE + 1); if((line = fgets(line, LINESIZE, fp)) == NULL) { break; } diff --git a/src/word.c b/src/word.c index 655e766..294c4d4 100644 --- a/src/word.c +++ b/src/word.c @@ -74,8 +74,7 @@ char *word2n(WORD word) char *word2bit(const WORD word) { WORD mask = 0x8000; - char *bit, *p; - bit = malloc(16 + 1); + char *bit = malloc(16 + 1), *p; p = bit; do { *p++ = (word & mask) ? '1' : '0';