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): clean up FuncExists
details: https://anonhg.NetBSD.org/src/rev/fb12eef1e1b0
branches: trunk
changeset: 978092:fb12eef1e1b0
user: rillig <rillig%NetBSD.org@localhost>
date: Sun Nov 08 21:10:18 2020 +0000
description:
make(1): clean up FuncExists
diffstat:
usr.bin/make/cond.c | 15 ++++++---------
1 files changed, 6 insertions(+), 9 deletions(-)
diffs (36 lines):
diff -r 4ce68038d7a4 -r fb12eef1e1b0 usr.bin/make/cond.c
--- a/usr.bin/make/cond.c Sun Nov 08 20:29:13 2020 +0000
+++ b/usr.bin/make/cond.c Sun Nov 08 21:10:18 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cond.c,v 1.187 2020/11/08 19:53:11 rillig Exp $ */
+/* $NetBSD: cond.c,v 1.188 2020/11/08 21:10:18 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.187 2020/11/08 19:53:11 rillig Exp $");
+MAKE_RCSID("$NetBSD: cond.c,v 1.188 2020/11/08 21:10:18 rillig Exp $");
/*
* The parsing of conditional expressions is based on this grammar:
@@ -312,13 +312,10 @@
char *path;
path = Dir_FindFile(arg, dirSearchPath);
- DEBUG2(COND, "exists(%s) result is \"%s\"\n", arg, path ? path : "");
- if (path != NULL) {
- result = TRUE;
- free(path);
- } else {
- result = FALSE;
- }
+ DEBUG2(COND, "exists(%s) result is \"%s\"\n",
+ arg, path != NULL ? path : "");
+ result = path != NULL;
+ free(path);
return result;
}
Home |
Main Index |
Thread Index |
Old Index