aboutsummaryrefslogtreecommitdiffstats
path: root/awkgram.c
diff options
context:
space:
mode:
Diffstat (limited to 'awkgram.c')
-rw-r--r--awkgram.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/awkgram.c b/awkgram.c
index b5985fe9..469184e5 100644
--- a/awkgram.c
+++ b/awkgram.c
@@ -212,7 +212,7 @@ const char awk_namespace[] = "awk";
const char *current_namespace = awk_namespace;
bool namespace_changed = false;
-static INSTRUCTION *rule_block[sizeof(ruletab)];
+static INSTRUCTION *rule_block[sizeof(ruletab)/sizeof(ruletab[0])];
static INSTRUCTION *ip_rec;
static INSTRUCTION *ip_newfile;
@@ -5293,7 +5293,7 @@ parse_program(INSTRUCTION **pcode, bool from_eval)
lexeof = false;
lexptr = NULL;
lasttok = 0;
- memset(rule_block, 0, sizeof(ruletab) * sizeof(INSTRUCTION *));
+ memset(rule_block, 0, sizeof(rule_block));
errcount = 0;
tok = tokstart != NULL ? tokstart : tokexpand();
@@ -5974,7 +5974,7 @@ get_comment(enum commenttype flag, INSTRUCTION **comment_instruction)
sourceline++;
tokadd(c);
}
- } while (isspace(c) && c != END_FILE);
+ } while (c != END_FILE && isspace(c));
if (c == END_FILE)
break;
else if (c != '#') {