From patchwork Mon Jan 10 03:45:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Quartulli X-Patchwork-Id: 2212 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director13.mail.ord1d.rsapps.net ([172.30.191.6]) by backend41.mail.ord1d.rsapps.net with LMTP id UCxKJalG3GEGFgAAqwncew (envelope-from ) for ; Mon, 10 Jan 2022 09:46:01 -0500 Received: from proxy14.mail.ord1d.rsapps.net ([172.30.191.6]) by director13.mail.ord1d.rsapps.net with LMTP id MIrOJqlG3GHCPgAA91zNiA (envelope-from ) for ; Mon, 10 Jan 2022 09:46:01 -0500 Received: from smtp26.gate.ord1d ([172.30.191.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy14.mail.ord1d.rsapps.net with LMTPS id 8EEIG6tG3GG+KAAAtEH5vw (envelope-from ) for ; Mon, 10 Jan 2022 09:46:03 -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: smtp26.gate.ord1d.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; dmarc=none (p=nil; dis=none) header.from=unstable.cc X-Suspicious-Flag: YES X-Classification-ID: 071c4130-7224-11ec-82fb-525400c5b129-1-1 Received: from [216.105.38.7] ([216.105.38.7:41012] helo=lists.sourceforge.net) by smtp26.gate.ord1d.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 27/12-10556-8A64CD16; Mon, 10 Jan 2022 09:46:01 -0500 Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.94.2) (envelope-from ) id 1n6vvF-0006xd-PW; Mon, 10 Jan 2022 14:45:20 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1n6vvD-0006xN-Pw for openvpn-devel@lists.sourceforge.net; Mon, 10 Jan 2022 14:45:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: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=I/U8U44nFx3SDEENceQz701QgfCCRjRHqOcRzKYHiMA=; b=Imi2f9CxEDvKsCVPfIRaSLUZ2f 238/oJ5OSEZKPzVa20oYp7Pr1Vx1vY+aqM4FQMaJ1TN03EeQtq7r3ZxMEGY/mtZWH2F+u1759lI2h abdHVOn+2yUcEm8cK/gscUuGc6LDySqGbPveG14zdZfhO7yCgNTmq9i3LgFDbzwzMcc8=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject:Cc:To:From :Sender:Reply-To:Content-Type: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=I/U8U44nFx3SDEENceQz701QgfCCRjRHqOcRzKYHiMA=; b=P P0t4rGFOdQO/IDPrwyHoV6kak9qhbOx4AmfuX2um2LjH8mvtR2G8hj2gZOIBElnoJdiZ7fIWqaoOO m9oDFvICSRY8bim/6L2hPM4QzGYxLdDdf36t2D/14Kk5TW3NmNfHQA4M5/Y1Sb4CWUsW9fTs2oIoC hYRr0910JxNrmDTI=; Received: from s2.neomailbox.net ([5.148.176.60]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.3) id 1n6vvA-0006Fb-8D for openvpn-devel@lists.sourceforge.net; Mon, 10 Jan 2022 14:45:18 +0000 From: Antonio Quartulli To: openvpn-devel@lists.sourceforge.net Date: Mon, 10 Jan 2022 15:45:10 +0100 Message-Id: <20220110144510.17769-1-a@unstable.cc> MIME-Version: 1.0 X-Spam-Report: Spam detection software, running on the system "util-spamd-1.v13.lw.sourceforge.com", 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: The arrow operator exists exactly to perform a pointer dereference implicitly while accessing a member. while at it, add whitespaces around the '-' operator on the same line. Signed-off-by: Antonio Quartulli --- src/openvpn/ssl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Content analysis details: (0.0 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record X-Headers-End: 1n6vvA-0006Fb-8D Subject: [Openvpn-devel] [PATCH] ssl.c: use arrow operator to access object member X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Antonio Quartulli Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox The arrow operator exists exactly to perform a pointer dereference implicitly while accessing a member. while at it, add whitespaces around the '-' operator on the same line. Signed-off-by: Antonio Quartulli Acked-by: Gert Doering --- src/openvpn/ssl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/openvpn/ssl.c b/src/openvpn/ssl.c index 400b2062..ef3597af 100644 --- a/src/openvpn/ssl.c +++ b/src/openvpn/ssl.c @@ -1669,9 +1669,9 @@ init_key_contexts(struct key_ctx_bi *key, init_key_ctx_bi(key, key2, key_direction, key_type, "Data Channel"); /* Initialize implicit IVs */ - key_ctx_update_implicit_iv(&key->encrypt, (*key2).keys[(int)server].hmac, + key_ctx_update_implicit_iv(&key->encrypt, key2->keys[(int)server].hmac, MAX_HMAC_KEY_LENGTH); - key_ctx_update_implicit_iv(&key->decrypt, (*key2).keys[1-(int)server].hmac, + key_ctx_update_implicit_iv(&key->decrypt, key2->keys[1 - (int)server].hmac, MAX_HMAC_KEY_LENGTH); }