summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2004-01-15 20:01:39 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2004-01-15 20:01:39 +0000
commited808d35e669774367956852513c83ed8599bcbd (patch)
treef0e83acdcc21f30fdc55bda5dc3d546465426d67
parentc6467b968aa69299548bc12699c9f1e5b99825f2 (diff)
this header file parser is pathetic, and parsing the new yacc output it
barfed. spotted by pbastos@rdc.puc-rio.br but my fix, ok millert otto
-rw-r--r--usr.bin/awk/maketab.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/awk/maketab.c b/usr.bin/awk/maketab.c
index e09410d3d68..6992fa992b1 100644
--- a/usr.bin/awk/maketab.c
+++ b/usr.bin/awk/maketab.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: maketab.c,v 1.7 2003/04/04 00:42:34 deraadt Exp $ */
+/* $OpenBSD: maketab.c,v 1.8 2004/01/15 20:01:38 deraadt Exp $ */
/****************************************************************
Copyright (C) Lucent Technologies 1997
All Rights Reserved
@@ -133,7 +133,7 @@ int main(int argc, char *argv[])
i = 0;
while (fgets(buf, sizeof buf, fp) != NULL) {
n = sscanf(buf, "%1c %s %s %d", &c, def, name, &tok);
- if (c != '#' || (n != 4 && strcmp(def,"define") != 0))
+ if (c != '#' || n != 4 || strcmp(def,"define") != 0)
continue; /* not a valid #define */
if (tok < FIRSTTOKEN || tok > LASTTOKEN) {
fprintf(stderr, "maketab: funny token %d %s ignored\n",