| Message ID | 1567784437-25922-1-git-send-email-lstipakov@gmail.com |
|---|---|
| State | Accepted |
| Headers |
Return-Path: <openvpn-devel-bounces@lists.sourceforge.net> Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director9.mail.ord1d.rsapps.net ([172.27.255.54]) by backend30.mail.ord1d.rsapps.net with LMTP id 6DMOJmp+cl2VHgAAIUCqbw for <patchwork@openvpn.net>; Fri, 06 Sep 2019 11:42:34 -0400 Received: from proxy3.mail.iad3a.rsapps.net ([172.27.255.54]) by director9.mail.ord1d.rsapps.net with LMTP id qCaaI2p+cl1TMAAAalYnBA ; Fri, 06 Sep 2019 11:42:34 -0400 Received: from smtp20.gate.iad3a ([172.27.255.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy3.mail.iad3a.rsapps.net with LMTP id SMrPHWp+cl0hDQAAYaqY3Q ; Fri, 06 Sep 2019 11:42:34 -0400 X-Spam-Threshold: 95 X-Spam-Score: 0 X-Spam-Flag: NO X-Virus-Scanned: OK X-Orig-To: openvpnslackdevel@openvpn.net X-Originating-Ip: [216.105.38.7] Authentication-Results: smtp20.gate.iad3a.rsapps.net; iprev=pass policy.iprev="216.105.38.7"; spf=pass smtp.mailfrom="openvpn-devel-bounces@lists.sourceforge.net" smtp.helo="lists.sourceforge.net"; dkim=fail (signature verification failed) header.d=sourceforge.net; dkim=fail (signature verification failed) header.d=sf.net; dkim=fail (signature verification failed) header.d=gmail.com; dmarc=fail (p=none; dis=none) header.from=gmail.com X-Suspicious-Flag: YES X-Classification-ID: f17c693c-d0bc-11e9-95f7-525400aab2f3-1-1 Received: from [216.105.38.7] ([216.105.38.7:55724] helo=lists.sourceforge.net) by smtp20.gate.iad3a.rsapps.net (envelope-from <openvpn-devel-bounces@lists.sourceforge.net>) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 27/1C-18448-A6E727D5; Fri, 06 Sep 2019 11:42:34 -0400 Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from <openvpn-devel-bounces@lists.sourceforge.net>) id 1i6GLy-0006E9-N6; Fri, 06 Sep 2019 15:40:50 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from <lstipakov@gmail.com>) id 1i6GLw-0006E0-O9 for openvpn-devel@lists.sourceforge.net; Fri, 06 Sep 2019 15:40:48 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=duKp1KEmeQwXh/Aa58XTmGC/7acFcgFhedZ8NfDkwek=; b=XNNAYhPBnq8XmHgOCZEGgmcSXT IJKj9/m3GZPWIkngXf6J/QlGjMS25U7HWOFJeEO1/+WlKqKvTiHzi+rQSvqO9TgxtNrGzDKHW6tQI xi5jPpfpnocSm+YSwL8Ey/UPIzVBVbhF5FAPWpwHcCVjcWSHqG29yd4VS98+IiyTGt4o=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc:MIME-Version: Content-Type:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=duKp1KEmeQwXh/Aa58XTmGC/7acFcgFhedZ8NfDkwek=; b=UYKssb9kOemP6jBXR+V6txvTMa FzNhVQmx8+WZcemxg9KbceuOQVyJVKzsct8/q92anlCCLkV16j90UXx0L/oQG/TZVGgv6TveSc8y3 YpplPy/nqB3bLOdh2I4G6C6Idnp3ZWhhR1fdjG9PyyVXVbCZ7h54ETYZK2vU51k+vLms=; Received: from mail-wr1-f67.google.com ([209.85.221.67]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.90_1) id 1i6GLv-0026nz-FX for openvpn-devel@lists.sourceforge.net; Fri, 06 Sep 2019 15:40:48 +0000 Received: by mail-wr1-f67.google.com with SMTP id y19so7089834wrd.3 for <openvpn-devel@lists.sourceforge.net>; Fri, 06 Sep 2019 08:40:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id; bh=duKp1KEmeQwXh/Aa58XTmGC/7acFcgFhedZ8NfDkwek=; b=Q/vMNu0+6Bux78PQVvNjR7/ID5dpyWRL/Ma7fktSUTkLf4AtkLCpNrprAxaG8DjSba lxEHlls6gpCxZVU4qeL0lfVuP5QN+jCp2qLu3We1Ypg5VBTumI/bcAUbr2wcHCkWuAoE PN8qjCVqgXuo8YwEwD823j1nlP7JtR6FvM9ok5olVIF2CFMcoW2/TxfDK9/REuXuhoOx NWcoWESx8aHFewlOisFUiGZRc2QoHC8D4Sy6ofSb4q0G7pcv+HHdrKRlUXfTQPMDRpVW YzS/GmL5VgJZiDs0SVUTZ1Qv6xl8/qOJXK6r70P5nd39syoVmmstRO4/GInzuufe/OjS 2muQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=duKp1KEmeQwXh/Aa58XTmGC/7acFcgFhedZ8NfDkwek=; b=ioLWCJDzD0/+ogJBHIu9UHcd/m6TpYcCnMzZONjFEo+N2fgthugtZjxFYAPmeoZXVr x/6FGvhfSrug5B2ePERghFNvs8/bTrdM41QZUk/d3eob3lIdlaB+i3A6lq3qSG3Edw71 kSGNX5/c6O4ygp9VRjNkU7zm67eFZckodtqs8bo90fXb3lUSFHnOlPe1DMslp9Qtl0UW JDauWdSnilMppZ0gbAZzwsyzpdqz7QbrBynB4a8w+qIvyGfpjYUFmvydxYYUwUUWcwA/ xV4rb2weMpMAGqFY10v+qvOGcC9puPmV4HhUyG42luBc1xsiJTFQMLfO9pO2A8OmfpxA Y7+w== X-Gm-Message-State: APjAAAX3qTbREO4dU7pst48WbZVOC6I445nzTkoben1s5PbDqxOHWXYC 5cLG/vFKF4U+Lz1J1ayLrtKn6Ym+D0Rm1A== X-Google-Smtp-Source: APXvYqxkILxffl41BXbI/KMxGRVcPaMxr5S9s/Fflo8Mr0VK+sR9hs6+WgrmPUSsuNzq7BkSlJnGDA== X-Received: by 2002:adf:f0c7:: with SMTP id x7mr7344785wro.2.1567784440475; Fri, 06 Sep 2019 08:40:40 -0700 (PDT) Received: from stipakov.fi (stipakov.fi. [128.199.52.117]) by smtp.gmail.com with ESMTPSA id e20sm7911908wrc.34.2019.09.06.08.40.39 for <openvpn-devel@lists.sourceforge.net> (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 06 Sep 2019 08:40:39 -0700 (PDT) From: Lev Stipakov <lstipakov@gmail.com> To: openvpn-devel@lists.sourceforge.net Date: Fri, 6 Sep 2019 18:40:37 +0300 Message-Id: <1567784437-25922-1-git-send-email-lstipakov@gmail.com> X-Mailer: git-send-email 2.7.4 X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (lstipakov[at]gmail.com) -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.221.67 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.221.67 listed in wl.mailspike.net] -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 X-Headers-End: 1i6GLv-0026nz-FX Subject: [Openvpn-devel] [PATCH] tun.h: change tun_set() return value type to void X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: <openvpn-devel.lists.sourceforge.net> List-Unsubscribe: <https://lists.sourceforge.net/lists/options/openvpn-devel>, <mailto:openvpn-devel-request@lists.sourceforge.net?subject=unsubscribe> List-Archive: <http://sourceforge.net/mailarchive/forum.php?forum_name=openvpn-devel> List-Post: <mailto:openvpn-devel@lists.sourceforge.net> List-Help: <mailto:openvpn-devel-request@lists.sourceforge.net?subject=help> List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/openvpn-devel>, <mailto:openvpn-devel-request@lists.sourceforge.net?subject=subscribe> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox |
| Series |
[Openvpn-devel] tun.h: change tun_set() return value type to void
|
|
Commit Message
Lev Stipakov
Sept. 6, 2019, 5:40 a.m. UTC
This function's return value is never used, so make it void.
Signed-off-by: Lev Stipakov <lstipakov@gmail.com>
---
src/openvpn/tun.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
Comments
Hi, On 06/09/2019 17:40, Lev Stipakov wrote: > This function's return value is never used, so make it void. > > Signed-off-by: Lev Stipakov <lstipakov@gmail.com> Does what it says and git suggests that its return value was never used. Using void as return type also clarifies its usage. Acked-by: Antonio Quartulli <a@unstable.cc>
On 06/09/2019 17:40, Lev Stipakov wrote: > This function's return value is never used, so make it void. > > Signed-off-by: Lev Stipakov <lstipakov@gmail.com> > --- > src/openvpn/tun.h | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/src/openvpn/tun.h b/src/openvpn/tun.h > index 69831c4..475643a 100644 > --- a/src/openvpn/tun.h > +++ b/src/openvpn/tun.h > @@ -513,7 +513,7 @@ tun_event_handle(const struct tuntap *tt) > #endif > } > > -static inline unsigned int > +static inline void > tun_set(struct tuntap *tt, > struct event_set *es, > unsigned int rwflags, I did some check into the history of this function, even going into the openvpn-historical-cvs git repository. The return value of this function was defined as unsigned int since the very beginning - going back to OpenVPN 2.0_beta18 - which basically was the first public commit after the 1.6.0 release. In my very quick look, not even once has the return value been used since that time. So this change makes sense. No need to have a return value which has not been interesting since November 2004. Acked-By: David Sommerseth <davids@openvpn.net>
Your patch has been applied to the master branch.
commit 3d52205097bee3106de9776dae8bcc93eca7ab72
Author: Lev Stipakov
Date: Fri Sep 6 18:40:37 2019 +0300
tun.h: change tun_set() return value type to void
Signed-off-by: Lev Stipakov <lstipakov@gmail.com>
Acked-by: Antonio Quartulli <antonio@openvpn.net>
Acked-by: David Sommerseth <davids@openvpn.net>
Message-Id: <1567784437-25922-1-git-send-email-lstipakov@gmail.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg18804.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
--
kind regards,
Gert Doering
diff --git a/src/openvpn/tun.h b/src/openvpn/tun.h index 69831c4..475643a 100644 --- a/src/openvpn/tun.h +++ b/src/openvpn/tun.h @@ -513,7 +513,7 @@ tun_event_handle(const struct tuntap *tt) #endif } -static inline unsigned int +static inline void tun_set(struct tuntap *tt, struct event_set *es, unsigned int rwflags, @@ -539,7 +539,6 @@ tun_set(struct tuntap *tt, #endif tt->rwflags_debug = rwflags; } - return rwflags; } const char *tun_stat(const struct tuntap *tt, unsigned int rwflags, struct gc_arena *gc);