make: remove redundant code from CondParser_ComparisonOrLeaf

No functional change.
This commit is contained in:
rillig 2021-12-30 01:34:26 +00:00
parent 9d23feca8b
commit 34c3bf6d63
1 changed files with 3 additions and 7 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: cond.c,v 1.319 2021/12/30 01:30:33 rillig Exp $ */
/* $NetBSD: cond.c,v 1.320 2021/12/30 01:34:26 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@ -95,7 +95,7 @@
#include "dir.h"
/* "@(#)cond.c 8.2 (Berkeley) 1/2/94" */
MAKE_RCSID("$NetBSD: cond.c,v 1.319 2021/12/30 01:30:33 rillig Exp $");
MAKE_RCSID("$NetBSD: cond.c,v 1.320 2021/12/30 01:34:26 rillig Exp $");
/*
* The parsing of conditional expressions is based on this grammar:
@ -778,7 +778,6 @@ CondParser_ComparisonOrLeaf(CondParser *par, bool doEval)
Token t;
char *arg = NULL;
const char *cp;
const char *cp1;
/* Push anything numeric through the compare expression */
cp = par->p;
@ -800,10 +799,7 @@ CondParser_ComparisonOrLeaf(CondParser *par, bool doEval)
arg = ParseWord(&cp, doEval);
assert(arg[0] != '\0');
cp1 = cp;
cpp_skip_whitespace(&cp1);
assert(cp1 == cp); /* TODO: remove the cpp_skip_whitespace above */
if (*cp1 == '=' || *cp1 == '!' || *cp1 == '<' || *cp1 == '>')
if (*cp == '=' || *cp == '!' || *cp == '<' || *cp == '>')
return CondParser_Comparison(par, doEval);
par->p = cp;