From patchwork Sun Feb 19 15:20:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 1744702 X-Patchwork-Delegate: hauke@hauke-m.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=0Haqutmw; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=hauke-m.de header.i=@hauke-m.de header.a=rsa-sha256 header.s=MBO0001 header.b=k4SOZRB7; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PKTpv1BKSz23j7 for ; Mon, 20 Feb 2023 02:23:51 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=s5aEMRf3m2vm9pd584vzv13vlm4+EMc1t7EQDzuEtzQ=; b=0Haqutmwbo2jUJ zzN9KP6YImDrVYqyHoCVu8YSbeYXfDaSKUB0fSwkJ9YwIZrPhFM62zwULf3Nfbpl4whlbnvoBjGAK vr6ySxrA2hlDpPPoSrKyf1juepzYrQVIrZjNtY4ex7Gq9AqCvsuKG/ZFK2W8JaWczsVAMQRri67iD vB7xn6IS1AFMva9gj6J9NHgAQsSeO6ZNObVGgHyz7ajH5czdLhdU9j7auLCcL37p79CQQt1qPXMY5 BmaugGkjkQU1I9aRGsEslJQK+ZFOE1tDj0hzxKp0gRBvxKnCywfEvm8k7Ke5yrH09twtuT0tefaGT ZFr6IkiKJ8sojsXKn2JA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pTlUp-001mZ8-Ux; Sun, 19 Feb 2023 15:21:00 +0000 Received: from mout-p-102.mailbox.org ([2001:67c:2050:0:465::102]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pTlUl-001mX6-W3 for openwrt-devel@lists.openwrt.org; Sun, 19 Feb 2023 15:20:57 +0000 Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4PKTlL1TfRz9sV0; Sun, 19 Feb 2023 16:20:46 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hauke-m.de; s=MBO0001; t=1676820046; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ur1O5cuLbQZQkc2dw39aVGud3n6ZSZDoiWFmo7s+6D4=; b=k4SOZRB76PmwwV7bl7OnSAg8lX+MdS0pcfhwNH592++tFrQcu1PO+FrhP5kwSPlAgWiZqM JUCKN4frYWb6kdLLm9frltPeCoiWcCqWkSSUePjHFk7WFhjx+IZwJoRuabdRliEZZTM4B1 EEt6PQmSCKbmtsz2l0tl/YLbd1aIkOC0G15DjxKavdLweslxBr+a9Y+umQGWdTxH/6Ydsp cgWWnCVg1rK4b++ky54YD+3q6zJGfUEAEz0dTz63hY+vzE8QNW0DwrSuHwB04HY9Dd8ka/ F0GYSxNaN/0xEYIOI7FbrGAVV7Ui+6J9rKaD0HZQuu6dD1l9epJyM9EVLgMZ0g== From: Hauke Mehrtens To: openwrt-devel@lists.openwrt.org Cc: Hauke Mehrtens Subject: [PATCH netifd 3/5] netifd: Do not return values in void function Date: Sun, 19 Feb 2023 16:20:25 +0100 Message-Id: <20230219152027.3417324-4-hauke@hauke-m.de> In-Reply-To: <20230219152027.3417324-1-hauke@hauke-m.de> References: <20230219152027.3417324-1-hauke@hauke-m.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230219_072056_248344_133928B9 X-CRM114-Status: UNSURE ( 9.80 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.9 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: These two functions return void, do not try to return a parameter. Signed-off-by: Hauke Mehrtens --- interface-event.c | 6 ++++-- main.c | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) Content analysis details: (-0.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [2001:67c:2050:0:465:0:0:102 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's 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_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org These two functions return void, do not try to return a parameter. Signed-off-by: Hauke Mehrtens --- interface-event.c | 6 ++++-- main.c | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/interface-event.c b/interface-event.c index a40f6dc..b03bfbc 100644 --- a/interface-event.c +++ b/interface-event.c @@ -49,8 +49,10 @@ run_cmd(const char *ifname, const char *device, enum interface_event event, int pid; pid = fork(); - if (pid < 0) - return task_complete(NULL, -1); + if (pid < 0) { + task_complete(NULL, -1); + return; + } if (pid > 0) { task.pid = pid; diff --git a/main.c b/main.c index 874dc8b..e5260b5 100644 --- a/main.c +++ b/main.c @@ -129,7 +129,8 @@ netifd_process_cb(struct uloop_process *proc, int ret) np = container_of(proc, struct netifd_process, uloop); netifd_delete_process(np); - return np->cb(np, ret); + np->cb(np, ret); + return; } int