From patchwork Tue Jan 1 23:44:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Heimpold X-Patchwork-Id: 1019860 X-Patchwork-Delegate: blogic@openwrt.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=heimpold.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="GzpZtQwf"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=heimpold.de header.i=@heimpold.de header.b="FMEiKu/D"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43TrS23FhYz9rxp for ; Wed, 2 Jan 2019 10:46:42 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:References: In-Reply-To:Message-Id:Date:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=IkHzNLfQoR/AFrL4e54nZlWJ6PPZIp64vXypIK8RYMU=; b=GzpZtQwfCOR27p uxmXoqFzw4MWIJvw3QDaenUMDhGljC4ojp6h+/o3mtG0hftnMEU+q4Gho3JPBnxryg5CC7wnkpYKb /f11v8cR94QjBA/UVEj5OjRj6C430ifnF9uM8AMUaZ1l2wFI4kpyTUKePZ1g4RN9vPsTJGovHFaZL RWAUFTmUfcdw87rdfQnPHFw6XdQfnLBFObe3OWkn3TSxKUzriIDHeWIEnqQoVzawPy1l8DmIn3Z/k 8wLCiDoPbe4Z1iRCf3RFy831n1Uc0CPiHmGe/4Hq/kjnp6B707XCCdweuCX930rm91VfaJ7zwudkj vHqpaQ0388FOAVuTJceA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1geTjx-0005TL-Bs; Tue, 01 Jan 2019 23:46:29 +0000 Received: from mo6-p00-ob.smtp.rzone.de ([2a01:238:20a:202:5300::11]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1geTig-00030b-CD for openwrt-devel@lists.openwrt.org; Tue, 01 Jan 2019 23:45:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1546386303; s=strato-dkim-0002; d=heimpold.de; h=References:In-Reply-To:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=MJwPEN0udEdfuv1ffuRhNz2+fZuRO8DfBJmWVp/aAg8=; b=FMEiKu/DS+iF/L0cUPGaMMe1LtoTwJu/0T5I8LzZqnxqgFq3qVYG8R/JFqkFPMhs/f JqvO9XUoIcQ3fljwDwrG79CLRvlBB5X93vxgkJz8WPpjgmOa9zntIUuKRiCX0fYADdXt i/Aopqr1DPu4/ORf2uVi7oU3oynvh1vFBwFOn+X7ABbnbx5jOe1M5KxslladriP/O/sp 944RMOOjJnua6L5zhaNYK0Agai1nNlLkwu+d1G3YA20k2onRBal8wImn0Xlb+E4jG7dP TQLefTKhUCMoLd9LKwRVFyYnFshCNb+j6iyDJXonY1+XMmRdTs8wCQ215lhv7z5SMFn4 Y00Q== X-RZG-AUTH: ":O2kGeEG7b/pS1EW8QnKjhhg/vO4pzqdNytq77N6ZKUSN7PfdWTGbO3oK8Gj1rLTl4HJ2UQ==" X-RZG-CLASS-ID: mo00 Received: from tonne.mhei.heimpold.itr by smtp.strato.de (RZmta 44.9 DYNA|AUTH) with ESMTPSA id y05b79v01Nj3HZo (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate); Wed, 2 Jan 2019 00:45:03 +0100 (CET) Received: from kerker.mhei.heimpold.itr (kerker.mhei.heimpold.itr [192.168.8.1]) by tonne.mhei.heimpold.itr (Postfix) with ESMTP id 7063C1C7A9A; Wed, 2 Jan 2019 00:45:02 +0100 (CET) From: Michael Heimpold To: openwrt-devel@lists.openwrt.org Date: Wed, 2 Jan 2019 00:44:53 +0100 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190101_154510_929986_426142CF X-CRM114-Status: UNSURE ( 8.15 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.9 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a01:238:20a:202:5300:0:0:11 listed in] [list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain Subject: [OpenWrt-Devel] [PATCH 1/7] procd: simplify code in procd_inittab_run X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Heimpold MIME-Version: 1.0 Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org This is a trial to make it more obvious what the historically grown code is actually doing. Signed-off-by: Michael Heimpold --- v2: use Jo-Philipp Wich's proposal inittab.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/inittab.c b/inittab.c index 55554b9..c9e6c13 100644 --- a/inittab.c +++ b/inittab.c @@ -259,12 +259,9 @@ void procd_inittab_run(const char *handler) list_for_each_entry(a, &actions, list) if (!strcmp(a->handler->name, handler)) { - if (a->handler->multi) { - a->handler->cb(a); - continue; - } a->handler->cb(a); - break; + if (!a->handler->multi) + break; } }