Module Name: src
Committed By: rillig
Date: Thu Dec 30 01:34:26 UTC 2021
Modified Files:
src/usr.bin/make: cond.c
Log Message:
make: remove redundant code from CondParser_ComparisonOrLeaf
No functional change.
To generate a diff of this commit:
cvs rdiff -u -r1.319 -r1.320 src/usr.bin/make/cond.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/make/cond.c
diff -u src/usr.bin/make/cond.c:1.319 src/usr.bin/make/cond.c:1.320
--- src/usr.bin/make/cond.c:1.319 Thu Dec 30 01:30:33 2021
+++ src/usr.bin/make/cond.c Thu Dec 30 01:34:26 2021
@@ -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 *
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 *
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;