summaryrefslogtreecommitdiffstats
path: root/usr.bin/make
diff options
context:
space:
mode:
authorharti <harti@FreeBSD.org>2005-05-12 15:38:11 +0000
committerharti <harti@FreeBSD.org>2005-05-12 15:38:11 +0000
commit8218c0d11c876124047355f4530af00214e03f85 (patch)
tree913d09a8fe1a2f0574d0992dbf4e67100c3b58cc /usr.bin/make
parentc5cd0cafaa49e714fa85c05bacf0d4180c3b45d8 (diff)
downloadFreeBSD-src-8218c0d11c876124047355f4530af00214e03f85.zip
FreeBSD-src-8218c0d11c876124047355f4530af00214e03f85.tar.gz
Move code in CondToken() and get rid of a goto.
Submitted by: Max Okumoto <okumoto@ucsd.edu> (7.243)
Diffstat (limited to 'usr.bin/make')
-rw-r--r--usr.bin/make/cond.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/usr.bin/make/cond.c b/usr.bin/make/cond.c
index 0a76913..8106523 100644
--- a/usr.bin/make/cond.c
+++ b/usr.bin/make/cond.c
@@ -544,23 +544,22 @@ CondToken(Boolean doEval)
} else {
condExpr += 1;
}
+ while (isspace((unsigned char)*condExpr)) {
+ condExpr++;
+ }
+ if (*condExpr == '\0') {
+ Parse_Error(PARSE_WARNING,
+ "Missing right-hand-side of operator");
+ goto error;
+ }
+ rhs = condExpr;
break;
+
default:
op = "!=";
rhs = "0";
-
- goto do_compare;
- }
- while (isspace((unsigned char)*condExpr)) {
- condExpr++;
- }
- if (*condExpr == '\0') {
- Parse_Error(PARSE_WARNING,
- "Missing right-hand-side of operator");
- goto error;
+ break;
}
- rhs = condExpr;
- do_compare:
if (*rhs == '"') {
/*
* Doing a string comparison. Only allow == and
OpenPOWER on IntegriCloud