| Message ID | 1541757573-30178-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 director12.mail.ord1d.rsapps.net ([172.30.191.6]) by backend30.mail.ord1d.rsapps.net with LMTP id 4HlIJi9c5VsFGAAAIUCqbw for <patchwork@openvpn.net>; Fri, 09 Nov 2018 05:06:39 -0500 Received: from proxy10.mail.ord1d.rsapps.net ([172.30.191.6]) by director12.mail.ord1d.rsapps.net with LMTP id MPrrJS9c5VtgWgAAIasKDg ; Fri, 09 Nov 2018 05:06:39 -0500 Received: from smtp37.gate.ord1c ([172.30.191.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy10.mail.ord1d.rsapps.net with LMTP id 8IO7JS9c5VvjZAAAfSg8FQ ; Fri, 09 Nov 2018 05:06:39 -0500 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: smtp37.gate.ord1c.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: 26001f6c-e407-11e8-b30d-525400e8d833-1-1 Received: from [216.105.38.7] ([216.105.38.7:57863] helo=lists.sourceforge.net) by smtp37.gate.ord1c.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 32/B8-31813-F2C55EB5; Fri, 09 Nov 2018 05:06:39 -0500 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 1gL3eH-0000Z9-JI; Fri, 09 Nov 2018 10:04:21 +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 1gL3eF-0000Z1-Mv for openvpn-devel@lists.sourceforge.net; Fri, 09 Nov 2018 10:04:19 +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=WWqtblz4EkG16VpYzH2mPM/Uj29OA/aPhONcxv4A+io=; b=esX52PoNh010BHr90ERxei+Rrl CfTdG0uNAaTMHPnf6gmFNtyvq5KYEVTrmyewUMVCOK6I8PzVqE31C+UclomwGlSMRwgvbTHvdW3mZ asBEYwlnvEYmxVxIvVNVMUXzC1N+YpiMDli2c75yIsi9WgFzpdkGFD4ttIJKPP4GPMUc=; 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=WWqtblz4EkG16VpYzH2mPM/Uj29OA/aPhONcxv4A+io=; b=Q6fxksxKa7/mIF0sZnseZkGqbz GIVa5K2HomkCO460NKqclXP6M75MlO4Ey1SPXkffoeLeK7WLZ3h1/3XmAlUo6wXMHEntRYT+ma3NX RNND7eHOTTKNVt0D806qxCNIdweMKJP4G3ihFaFN9096EtJbUvQCch460UuBsnrnCe8s=; Received: from mail-ed1-f68.google.com ([209.85.208.68]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.90_1) id 1gL3e7-00CAHL-Pj for openvpn-devel@lists.sourceforge.net; Fri, 09 Nov 2018 10:04:19 +0000 Received: by mail-ed1-f68.google.com with SMTP id h21-v6so1267673edq.9 for <openvpn-devel@lists.sourceforge.net>; Fri, 09 Nov 2018 02:04:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id; bh=WWqtblz4EkG16VpYzH2mPM/Uj29OA/aPhONcxv4A+io=; b=kuB8HIhL8NBPAFolND0nh2cvpiQXQdaVtSoPOzDmvfQN2aLogr7msx1V0TJnckPoXw Z6bPW5+mg/NRjH2BTtAgaFZKKTkssUaASf0aaimzloMyTX4bT8PoC1RaKiGC38iwidr2 sKcmczvokz/qLhzDopF6nSZUeFaAAn+JLK4dAYBAWcKDaIpUA7BXcJw3ZeeTkxnZyUi3 kR9V5eQx71upAREJzcN0OpT069xrLa+sUm0XbguuvzJutZqDLtnayHpcsZOsSrZmeG4S BHYALr47KJyM5MXIQgRFOrF0VxLypgvSEaD297gDTW6uVLXPwMVpgBI0oLnLKLOziToG gNYg== 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=WWqtblz4EkG16VpYzH2mPM/Uj29OA/aPhONcxv4A+io=; b=h8h4JPwXbjcSQee00DJxE/yZTi6hQGKa79so3Rg4vl5sAA9W63N/ZZQverE7cqH+V7 q6nXt0SeKcwdY61LmiE8B2e6vgsaRypDHa89xX9OyOud2/MQN9AiTM2QueNo2zRuYU4V KDVSrOnmdV9KUTd0UowVVeDmeYvDFU9gPxTgORypJjJDDi+ChiAf2vG0gxtCD27VPPmK WfNWKK8U0nI6YmP2F5QMjhp6jsoPf3JinVeHV6E0CNYXzfQS3mBOdiGYkKry9XMnz8Y5 OMMEGYeQ+8GeLCRk1ldXKQ2ZKeqwkEL6vP7VqKpZ/pR/3g6rGI9XsidDfwkFWv518CFq O4lw== X-Gm-Message-State: AGRZ1gJsDcoUvH8FYtZdYhIJZUhZ+vHqD0OiO3BRS3a5rCw7fVhWpwVC oz0Mjk+JIOHrglgIainqFscW8NjZgnk= X-Google-Smtp-Source: AJdET5dM8jSDXxYmBeGDFsZ8Iz03QkfSIdnVd2m8LhI/La0sF4gxD5/4I5By9QpcDEmG3dRDT5WjMA== X-Received: by 2002:a17:906:4ac4:: with SMTP id u4-v6mr1407847ejt.202.1541757844281; Fri, 09 Nov 2018 02:04:04 -0800 (PST) Received: from stipakov.fi (stipakov.fi. [128.199.52.117]) by smtp.gmail.com with ESMTPSA id w6-v6sm1793386edb.37.2018.11.09.02.04.02 for <openvpn-devel@lists.sourceforge.net> (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 09 Nov 2018 02:04:02 -0800 (PST) From: Lev Stipakov <lstipakov@gmail.com> To: openvpn-devel@lists.sourceforge.net Date: Fri, 9 Nov 2018 11:59:33 +0200 Message-Id: <1541757573-30178-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_MSPIKE_H2 RBL: Average reputation (+2) [209.85.208.68 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches 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.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [209.85.208.68 listed in list.dnswl.org] X-Headers-End: 1gL3e7-00CAHL-Pj Subject: [Openvpn-devel] [PATCH] Remove extra token after #endif 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] Remove extra token after #endif
|
|
Commit Message
Lev Stipakov
Nov. 8, 2018, 10:59 p.m. UTC
Commit ee80ce3d6f2ebc59068338757311e0488ae620fc wrapped
code in #ifdef/#endif and added extra token after #endif,
which produces compiler warning.
This removes unneeded extra token.
Signed-off-by: Lev Stipakov <lstipakov@gmail.com>
---
src/openvpn/init.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Comments
Lev Stipakov <lstipakov@gmail.com> on Fri, 2018/11/09 11:59: > Commit ee80ce3d6f2ebc59068338757311e0488ae620fc wrapped > code in #ifdef/#endif and added extra token after #endif, > which produces compiler warning. > > This removes unneeded extra token. > > Signed-off-by: Lev Stipakov <lstipakov@gmail.com> > --- > src/openvpn/init.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/src/openvpn/init.c b/src/openvpn/init.c > index 586e4ca..1cdef31 100644 > --- a/src/openvpn/init.c > +++ b/src/openvpn/init.c > @@ -624,7 +624,7 @@ save_ncp_options(struct context *c) > c->c1.ciphername = c->options.ciphername; > c->c1.authname = c->options.authname; > c->c1.keysize = c->options.keysize; > -#endif ENABLE_CRYPTO > +#endif Perhaps this should go into comment: #endif /* ENABLE_CRYPTO */
Acked-by: Gert Doering <gert@greenie.muc.de> Thanks. Regarding Christian's comment about "#endif" vs. "#endif /* ENABLE_CRYPTO /*" - well, we have both in our tree, so neither is "correct" or "wrong". For such a short #ifdef/#endif span, I'd see it as optional because the corresponding #ifdef is easily spotted. For something spanning more code, possibly nested #ifdef, a comment after the #endif would definitely be better, though. Your patch has been applied to the release/2.4 branch. commit ca962f3837ab05b0e8a4382960391f289497eaa2 Author: Lev Stipakov Date: Fri Nov 9 11:59:33 2018 +0200 Remove extra token after #endif Signed-off-by: Lev Stipakov <lstipakov@gmail.com> Acked-by: Gert Doering <gert@greenie.muc.de> Message-Id: <1541757573-30178-1-git-send-email-lstipakov@gmail.com> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg17883.html Signed-off-by: Gert Doering <gert@greenie.muc.de> -- kind regards, Gert Doering
On 21/11/2018 10:34, Gert Doering wrote: > > Regarding Christian's comment about "#endif" vs. "#endif /* ENABLE_CRYPTO /*" > - well, we have both in our tree, so neither is "correct" or "wrong". > > For such a short #ifdef/#endif span, I'd see it as optional because the > corresponding #ifdef is easily spotted. For something spanning more > code, possibly nested #ifdef, a comment after the #endif would definitely > be better, though. Just FTR; I share this point of view. We've not been too picky about these #endif remarks in the past but something we saw more of after the big reformatting commit right before the v2.4.0 release. We used these uncrustify settings for the great reformatting patch: ------------------- # Annotate #else and #endif statements mod_add_long_ifdef_endif_comment=20 mod_add_long_ifdef_else_comment=5 -------------------
diff --git a/src/openvpn/init.c b/src/openvpn/init.c index 586e4ca..1cdef31 100644 --- a/src/openvpn/init.c +++ b/src/openvpn/init.c @@ -624,7 +624,7 @@ save_ncp_options(struct context *c) c->c1.ciphername = c->options.ciphername; c->c1.authname = c->options.authname; c->c1.keysize = c->options.keysize; -#endif ENABLE_CRYPTO +#endif } /* Restores NCP-negotiable options to original values */ @@ -635,7 +635,7 @@ restore_ncp_options(struct context *c) c->options.ciphername = c->c1.ciphername; c->options.authname = c->c1.authname; c->options.keysize = c->c1.keysize; -#endif ENABLE_CRYPTO +#endif } void