Module Name: src
Committed By: rillig
Date: Sat Dec 11 11:13:30 UTC 2021
Modified Files:
src/usr.bin/make: cond.c
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.297 -r1.298 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.297 src/usr.bin/make/cond.c:1.298
--- src/usr.bin/make/cond.c:1.297 Sat Dec 11 10:57:10 2021
+++ src/usr.bin/make/cond.c Sat Dec 11 11:13:30 2021
@@ -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 @@ CondParser_FuncCall(CondParser *par, boo
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;
}