Module Name:    src
Committed By:   rillig
Date:           Tue Nov 24 22:45:24 UTC 2020

Modified Files:
        src/usr.bin/make: make.c

Log Message:
make(1): inline Lst_ForEachUntil in MakeStartJobs


To generate a diff of this commit:
cvs rdiff -u -r1.212 -r1.213 src/usr.bin/make/make.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/make.c
diff -u src/usr.bin/make/make.c:1.212 src/usr.bin/make/make.c:1.213
--- src/usr.bin/make/make.c:1.212	Tue Nov 24 22:32:18 2020
+++ src/usr.bin/make/make.c	Tue Nov 24 22:45:24 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: make.c,v 1.212 2020/11/24 22:32:18 rillig Exp $	*/
+/*	$NetBSD: make.c,v 1.213 2020/11/24 22:45:24 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -102,7 +102,7 @@
 #include "job.h"
 
 /*	"@(#)make.c	8.1 (Berkeley) 6/6/93"	*/
-MAKE_RCSID("$NetBSD: make.c,v 1.212 2020/11/24 22:32:18 rillig Exp $");
+MAKE_RCSID("$NetBSD: make.c,v 1.213 2020/11/24 22:45:24 rillig Exp $");
 
 /* Sequence # to detect recursion. */
 static unsigned int checked_seqno = 1;
@@ -945,7 +945,16 @@ MakeStartJobs(void)
 	     * just before the current first element.
 	     */
 	    gn->made = DEFERRED;
-	    Lst_ForEachUntil(gn->children, MakeBuildChild, toBeMade->first);
+
+	    {
+		GNodeListNode *firstToBeMade = toBeMade->first;
+		GNodeListNode *ln;
+
+		for (ln = gn->children->first; ln != NULL; ln = ln->next)
+		    if (MakeBuildChild(ln->datum, firstToBeMade) != 0)
+			break;
+	    }
+
 	    /* and drop this node on the floor */
 	    DEBUG2(MAKE, "dropped %s%s\n", gn->name, gn->cohort_num);
 	    continue;

Reply via email to