Module Name: src
Committed By: rillig
Date: Sun Nov 8 23:10:22 UTC 2020
Modified Files:
src/usr.bin/make: cond.c
Log Message:
make(1): inline strchr call in CondParser_LeafToken
To generate a diff of this commit:
cvs rdiff -u -r1.194 -r1.195 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.194 src/usr.bin/make/cond.c:1.195
--- src/usr.bin/make/cond.c:1.194 Sun Nov 8 23:08:49 2020
+++ src/usr.bin/make/cond.c Sun Nov 8 23:10:22 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: cond.c,v 1.194 2020/11/08 23:08:49 rillig Exp $ */
+/* $NetBSD: cond.c,v 1.195 2020/11/08 23:10:22 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -93,7 +93,7 @@
#include "dir.h"
/* "@(#)cond.c 8.2 (Berkeley) 1/2/94" */
-MAKE_RCSID("$NetBSD: cond.c,v 1.194 2020/11/08 23:08:49 rillig Exp $");
+MAKE_RCSID("$NetBSD: cond.c,v 1.195 2020/11/08 23:10:22 rillig Exp $");
/*
* The parsing of conditional expressions is based on this grammar:
@@ -767,7 +767,7 @@ CondParser_LeafToken(CondParser *par, Bo
/* Push anything numeric through the compare expression */
cp = par->p;
- if (ch_isdigit(cp[0]) || strchr("+-", cp[0]) != NULL)
+ if (ch_isdigit(cp[0]) || cp[0] == '-' || cp[0] == '+')
return CondParser_Comparison(par, doEval);
/*