Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified)) by mollari.NetBSD.org (Postfix) with ESMTPS id AC2131A923A for ; Sat, 29 Aug 2020 20:20:45 +0000 (UTC) Received: by mail.netbsd.org (Postfix, from userid 605) id 2D51C84D88; Sat, 29 Aug 2020 20:20:45 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id A694284D7F for ; Sat, 29 Aug 2020 20:20:44 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id 73CYE7jowUFA for ; Sat, 29 Aug 2020 20:20:44 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id 3C90484CCD for ; Sat, 29 Aug 2020 20:20:44 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 359E5FB27; Sat, 29 Aug 2020 20:20:44 +0000 (UTC) Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" MIME-Version: 1.0 Date: Sat, 29 Aug 2020 20:20:44 +0000 From: "Roland Illig" Subject: CVS commit: src/usr.bin/make To: source-changes@NetBSD.org X-Mailer: log_accum Message-Id: <20200829202044.359E5FB27@cvs.NetBSD.org> Sender: source-changes-owner@NetBSD.org List-Id: source-changes.NetBSD.org Precedence: bulk Reply-To: source-changes-d@NetBSD.org Mail-Reply-To: "Roland Illig" Mail-Followup-To: source-changes-d@NetBSD.org List-Unsubscribe: Module Name: src Committed By: rillig Date: Sat Aug 29 20:20:44 UTC 2020 Modified Files: src/usr.bin/make: targ.c Log Message: make(1): use loops instead of Lst_ForEach for propagating to cohorts For one-liners, Lst_ForEach creates a lot of overhead, both at runtime and for reading and understanding the code. In this simple case where the structure of the traversed nodes is not modified, a simple loop is enough. This avoids a lot of conversions to void * and thus prevents type mistakes. To generate a diff of this commit: cvs rdiff -u -r1.77 -r1.78 src/usr.bin/make/targ.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.