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): migrate MakeAddAllSrc to Lst_ForEach
details: https://anonhg.NetBSD.org/src/rev/fc2380673507
branches: trunk
changeset: 939058:fc2380673507
user: rillig <rillig%NetBSD.org@localhost>
date: Thu Sep 24 07:34:35 2020 +0000
description:
make(1): migrate MakeAddAllSrc to Lst_ForEach
diffstat:
usr.bin/make/make.c | 17 ++++++-----------
1 files changed, 6 insertions(+), 11 deletions(-)
diffs (76 lines):
diff -r 983a6e4cdfbf -r fc2380673507 usr.bin/make/make.c
--- a/usr.bin/make/make.c Thu Sep 24 07:32:03 2020 +0000
+++ b/usr.bin/make/make.c Thu Sep 24 07:34:35 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: make.c,v 1.141 2020/09/24 07:32:03 rillig Exp $ */
+/* $NetBSD: make.c,v 1.142 2020/09/24 07:34:35 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -107,7 +107,7 @@
#include "job.h"
/* "@(#)make.c 8.1 (Berkeley) 6/6/93" */
-MAKE_RCSID("$NetBSD: make.c,v 1.141 2020/09/24 07:32:03 rillig Exp $");
+MAKE_RCSID("$NetBSD: make.c,v 1.142 2020/09/24 07:34:35 rillig Exp $");
static unsigned int checked = 1;/* Sequence # to detect recursion */
static GNodeList *toBeMade; /* The current fringe of the graph. These
@@ -119,7 +119,6 @@
static int MakeAddChild(void *, void *);
static int MakeFindChild(void *, void *);
static int MakeUnmark(void *, void *);
-static int MakeAddAllSrc(void *, void *);
static int MakeTimeStamp(void *, void *);
static int MakeHandleUse(void *, void *);
static Boolean MakeStartJobs(void);
@@ -871,21 +870,18 @@
* pgnp The parent to whose ALLSRC variable it should
* be added
*
- * Results:
- * Always returns 0
- *
* Side Effects:
* The ALLSRC variable for the given node is extended.
*-----------------------------------------------------------------------
*/
-static int
+static void
MakeAddAllSrc(void *cgnp, void *pgnp)
{
GNode *cgn = (GNode *)cgnp;
GNode *pgn = (GNode *)pgnp;
if (cgn->type & OP_MARK)
- return 0;
+ return;
cgn->type |= OP_MARK;
if ((cgn->type & (OP_EXEC|OP_USE|OP_USEBEFORE|OP_INVISIBLE)) == 0) {
@@ -931,7 +927,6 @@
}
bmake_free(p1);
}
- return 0;
}
/*-
@@ -963,7 +958,7 @@
return;
Lst_ForEachUntil(gn->children, MakeUnmark, gn);
- Lst_ForEachUntil(gn->children, MakeAddAllSrc, gn);
+ Lst_ForEach(gn->children, MakeAddAllSrc, gn);
if (!Var_Exists (OODATE, gn)) {
Var_Set(OODATE, "", gn);
@@ -1043,7 +1038,7 @@
Lst_ForEachUntil(cn->cohorts, MakeBuildChild, toBeMade_next);
/*
- * If this node is a .WAIT node with unmade chlidren
+ * If this node is a .WAIT node with unmade children
* then don't add the next sibling.
*/
return cn->type & OP_WAIT && cn->unmade > 0;
Home |
Main Index |
Thread Index |
Old Index