Move code in CondToken() and get rid of a goto.

Submitted by:	Max Okumoto <okumoto@ucsd.edu> (7.243)
This commit is contained in:
Hartmut Brandt 2005-05-12 15:38:11 +00:00
parent 8de86ef91d
commit 375209dd24

View File

@ -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;
break;
}
while (isspace((unsigned char)*condExpr)) {
condExpr++;
}
if (*condExpr == '\0') {
Parse_Error(PARSE_WARNING,
"Missing right-hand-side of operator");
goto error;
}
rhs = condExpr;
do_compare:
if (*rhs == '"') {
/*
* Doing a string comparison. Only allow == and