Module Name: src Committed By: rillig Date: Tue Nov 24 22:32:18 UTC 2020
Modified Files: src/usr.bin/make: make.c Log Message: make(1): inline Lst_ForEachUntil in MakeBuildChild This prepares for removing the void pointers from the function signature. To generate a diff of this commit: cvs rdiff -u -r1.211 -r1.212 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.211 src/usr.bin/make/make.c:1.212 --- src/usr.bin/make/make.c:1.211 Tue Nov 24 19:33:13 2020 +++ src/usr.bin/make/make.c Tue Nov 24 22:32:18 2020 @@ -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 @@ MakeBuildChild(void *v_cn, void *toBeMad 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