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(1): inline strchr call in CondParser_LeafT...



details:   https://anonhg.NetBSD.org/src/rev/43849ff803f1
branches:  trunk
changeset: 956884:43849ff803f1
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Nov 08 23:10:22 2020 +0000

description:
make(1): inline strchr call in CondParser_LeafToken

diffstat:

 usr.bin/make/cond.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r b2f0a1ca327c -r 43849ff803f1 usr.bin/make/cond.c
--- a/usr.bin/make/cond.c       Sun Nov 08 23:08:49 2020 +0000
+++ b/usr.bin/make/cond.c       Sun Nov 08 23:10:22 2020 +0000
@@ -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 @@
 
     /* 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);
 
     /*



Home | Main Index | Thread Index | Old Index