Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/make make: remove redundant code from CondParser_Com...
details: https://anonhg.NetBSD.org/src/rev/c8942620c29f
branches: trunk
changeset: 1029285:c8942620c29f
user: rillig <rillig%NetBSD.org@localhost>
date: Thu Dec 30 01:34:26 2021 +0000
description:
make: remove redundant code from CondParser_ComparisonOrLeaf
No functional change.
diffstat:
usr.bin/make/cond.c | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
diffs (38 lines):
diff -r 96cb0ee270b2 -r c8942620c29f usr.bin/make/cond.c
--- a/usr.bin/make/cond.c Thu Dec 30 01:30:33 2021 +0000
+++ b/usr.bin/make/cond.c Thu Dec 30 01:34:26 2021 +0000
@@ -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 @@
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 @@
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;
Home |
Main Index |
Thread Index |
Old Index