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): inline Lst_ForEachUntil in MakeBuildChild



details:   https://anonhg.NetBSD.org/src/rev/6e9a76d07da1
branches:  trunk
changeset: 957331:6e9a76d07da1
user:      rillig <rillig%NetBSD.org@localhost>
date:      Tue Nov 24 22:32:18 2020 +0000

description:
make(1): inline Lst_ForEachUntil in MakeBuildChild

This prepares for removing the void pointers from the function
signature.

diffstat:

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

diffs (34 lines):

diff -r 89e8aa6b287b -r 6e9a76d07da1 usr.bin/make/make.c
--- a/usr.bin/make/make.c       Tue Nov 24 21:42:28 2020 +0000
+++ b/usr.bin/make/make.c       Tue Nov 24 22:32:18 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: make.c,v 1.211 2020/11/24 19:33:13 rillig Exp $        */
+/*     $NetBSD: make.c,v 1.212 2020/11/24 22:32:18 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.211 2020/11/24 19:33:13 rillig Exp $");
+MAKE_RCSID("$NetBSD: make.c,v 1.212 2020/11/24 22:32:18 rillig Exp $");
 
 /* Sequence # to detect recursion. */
 static unsigned int checked_seqno = 1;
@@ -871,8 +871,13 @@
     else
        Lst_InsertBefore(toBeMade, toBeMade_next, cn);
 
-    if (cn->unmade_cohorts != 0)
-       Lst_ForEachUntil(cn->cohorts, MakeBuildChild, toBeMade_next);
+    if (cn->unmade_cohorts != 0) {
+       ListNode *ln;
+
+       for (ln = cn->cohorts->first; ln != NULL; ln = ln->next)
+           if (MakeBuildChild(ln->datum, toBeMade_next) != 0)
+               break;
+    }
 
     /*
      * If this node is a .WAIT node with unmade children



Home | Main Index | Thread Index | Old Index