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 dead code in CondParser_FuncCall



details:   https://anonhg.NetBSD.org/src/rev/69f583717b26
branches:  trunk
changeset: 1027562:69f583717b26
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Dec 11 11:13:30 2021 +0000

description:
make: remove dead code in CondParser_FuncCall

The return value (size_t)-1 was only used by the function 'empty', which
moved to CondParser_FuncCallEmpty.

No functional change.

diffstat:

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

diffs (30 lines):

diff -r 3809076b3bed -r 69f583717b26 usr.bin/make/cond.c
--- a/usr.bin/make/cond.c       Sat Dec 11 10:57:10 2021 +0000
+++ b/usr.bin/make/cond.c       Sat Dec 11 11:13:30 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cond.c,v 1.297 2021/12/11 10:57:10 rillig Exp $        */
+/*     $NetBSD: cond.c,v 1.298 2021/12/11 11:13:30 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.297 2021/12/11 10:57:10 rillig Exp $");
+MAKE_RCSID("$NetBSD: cond.c,v 1.298 2021/12/11 11:13:30 rillig Exp $");
 
 /*
  * The parsing of conditional expressions is based on this grammar:
@@ -777,9 +777,9 @@
                return false;
 
        arglen = ParseFuncArg(par, &cp, doEval, fn->fn_name, &arg);
-       if (arglen == 0 || arglen == (size_t)-1) {
+       if (arglen == 0) {
                par->p = cp;
-               *out_token = arglen == 0 ? TOK_FALSE : TOK_ERROR;
+               *out_token = TOK_FALSE;
                return true;
        }
 



Home | Main Index | Thread Index | Old Index