summaryrefslogtreecommitdiff
path: root/usr.bin/make/parse.c
diff options
context:
space:
mode:
authorrillig <rillig@NetBSD.org>2020-10-03 21:23:42 +0000
committerrillig <rillig@NetBSD.org>2020-10-03 21:23:42 +0000
commite493497589bc631bf1405fd36aacc7ca7eb3d249 (patch)
tree60ff2791577ad7852fdc8117c47a5b2e29bf6973 /usr.bin/make/parse.c
parent9a7663d90175930c91d1e72e715f46aba91d68e2 (diff)
make(1): inline macro ISEQOPERATOR
The name of the macro was wrong. These characters are not used in an equality operator, it's an assignment operator.
Diffstat (limited to 'usr.bin/make/parse.c')
-rw-r--r--usr.bin/make/parse.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/usr.bin/make/parse.c b/usr.bin/make/parse.c
index 060aee59fe4..597a4ef1a40 100644
--- a/usr.bin/make/parse.c
+++ b/usr.bin/make/parse.c
@@ -1,4 +1,4 @@
-/* $NetBSD: parse.c,v 1.345 2020/10/03 21:19:54 rillig Exp $ */
+/* $NetBSD: parse.c,v 1.346 2020/10/03 21:23:42 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -132,7 +132,7 @@
#include "pathnames.h"
/* "@(#)parse.c 8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: parse.c,v 1.345 2020/10/03 21:19:54 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.346 2020/10/03 21:23:42 rillig Exp $");
/* types and constants */
@@ -1690,12 +1690,8 @@ Parse_IsVar(const char *line)
Boolean wasSpace = FALSE; /* set TRUE if found a space */
char ch;
int level = 0;
-#define ISEQOPERATOR(c) \
- (((c) == '+') || ((c) == ':') || ((c) == '?') || ((c) == '!'))
- /*
- * Skip to variable name
- */
+ /* Skip to variable name */
while (*line == ' ' || *line == '\t')
line++;
@@ -1723,7 +1719,7 @@ Parse_IsVar(const char *line)
#endif
if (ch == '=')
return TRUE;
- if (*line == '=' && ISEQOPERATOR(ch))
+ if (*line == '=' && (ch == '+' || ch == ':' || ch == '?' || ch == '!'))
return TRUE;
if (wasSpace)
return FALSE;