| Message ID | 20171110110858.11482-1-steffan@karger.me |
|---|---|
| State | Accepted |
| Headers |
Return-Path: <openvpn-devel-bounces@lists.sourceforge.net> Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director6.mail.ord1d.rsapps.net ([172.27.255.7]) by backend31.mail.ord1d.rsapps.net (Dovecot) with LMTP id s6sTBAGJBVo4IQAAgoeIoA for <patchwork@openvpn.net>; Fri, 10 Nov 2017 06:09:53 -0500 Received: from proxy18.mail.iad3a.rsapps.net ([172.27.255.7]) by director6.mail.ord1d.rsapps.net (Dovecot) with LMTP id McVGAAGJBVqFGQAAhgvE6Q ; Fri, 10 Nov 2017 06:09:53 -0500 Received: from smtp29.gate.iad3a ([172.27.255.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy18.mail.iad3a.rsapps.net (Dovecot) with LMTP id WYXOEACJBVowPwAAon3hFg ; Fri, 10 Nov 2017 06:09:52 -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.34.181.88] Authentication-Results: smtp29.gate.iad3a.rsapps.net; iprev=pass policy.iprev="216.34.181.88"; 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=karger-me.20150623.gappssmtp.com; dmarc=none (p=nil; dis=none) header.from=karger.me X-Classification-ID: acaf7040-c607-11e7-a529-bc305bf5a2b4-1-1 Received: from [216.34.181.88] ([216.34.181.88:8609] helo=lists.sourceforge.net) by smtp29.gate.iad3a.rsapps.net (envelope-from <openvpn-devel-bounces@lists.sourceforge.net>) (ecelerity 4.2.1.56364 r(Core:4.2.1.14)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 26/BA-32069-009850A5; Fri, 10 Nov 2017 06:09:52 -0500 Received: from localhost ([127.0.0.1] helo=sfs-ml-4.v29.ch3.sourceforge.com) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.89) (envelope-from <openvpn-devel-bounces@lists.sourceforge.net>) id 1eD7BY-0004r1-GC; Fri, 10 Nov 2017 11:09:20 +0000 Received: from sfi-mx-3.v28.ch3.sourceforge.com ([172.29.28.193] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from <steffan@karger.me>) id 1eD7BX-0004qv-86 for openvpn-devel@lists.sourceforge.net; Fri, 10 Nov 2017 11:09: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:Cc:To:From:Sender:Reply-To: 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=Klp3CDmoNWxiTB6Mk5UCLjxdKi0XtvnSIJIMABoqSxA=; b=XdzBNODbLMEkZ2o/UAStyoTPlz B8nF86zxP9APm1SIClfucXpmjU/BveR5gCpiCrhDrBtFEF1D3VY//WBK/VDtadekGKk7LXLbwvUHW 9D1jjXIWQss00WKmxyGFbEgsojtNy/zgfk+4daZjPUE2+HiV8ZDqRsWI4QaSdbl/dcsk=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: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=Klp3CDmoNWxiTB6Mk5UCLjxdKi0XtvnSIJIMABoqSxA=; b=GgcxSe88pmIaZwlFVGLrOgiPIG aKA8xbIvMWkE3Z+qEFCda9moC58ihc1j5pgJWcYWMj6vCHk8Le1hZDcS+YnbkLZCJbuCjmvhHByIv lbvZu6yCWdw+Nd09FOMWz6ygFnR4JFVUI8Tc76/dlKbLFOS37Unbd3wTR6fkQzGT6QoQ=; Received: from mail-wm0-f68.google.com ([74.125.82.68]) by sfi-mx-3.v28.ch3.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.89) id 1eD7BV-0000ZN-K1 for openvpn-devel@lists.sourceforge.net; Fri, 10 Nov 2017 11:09:19 +0000 Received: by mail-wm0-f68.google.com with SMTP id z3so1952776wme.5 for <openvpn-devel@lists.sourceforge.net>; Fri, 10 Nov 2017 03:09:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=karger-me.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=Klp3CDmoNWxiTB6Mk5UCLjxdKi0XtvnSIJIMABoqSxA=; b=wc2Tmq5y7qdNqQ0jtstRQdDzl8Aa4LsisxRc5w89Lqh8yLsNOVBs6kBmrMX9eUDOfW gOU8lqSaxrc7xKGqFZHJ7OVzv9GiQeBv3KIGF8wv4NqYBgwzvBwCTdnVJmGdWjjtN5DS JUaZlrzO4NTRuyk82ZctHSkX7m2nYsooF147h4GkYo7sLsUUIjAiLplpld3+T4uHKEtq z85y9iIY1/6jMK64srTu9sjzgCarNQfFC/aPlezpUT85vfFyb7gaTe7+4tAeEDsgYR46 GCrWXMmwu1hziTh6tlL6k/5vUcoBhYbBo+2XHlLYVtcpSKl9wHGMuRlPNd1h4z60MfQs lfFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Klp3CDmoNWxiTB6Mk5UCLjxdKi0XtvnSIJIMABoqSxA=; b=T/anQR1nWFRaDrXSA6GjvJrSXdXlbDYqZGt0nGzBQY6kUHxXW26x9ohO3rs5nW9CvJ 7Qskvo8K63DEmsNQZomcILFD5nRem/sW4xbDY0M0LITHUES6o6td9YuN24DW4Vjfp3cB NwkkaqG0aISKys1uhux53TQtBFWk2mTciLQ1TH5NfyHUQSlTjPedhPvD5Nea/rIuc+T/ izrp+15wZTTE+VpL6uVskLPC47SCIrY42FAs3fZOeDg8ZS3Uzgx+w1fQN1t071NOQDho r6OA0T8BNJ9zyO8KLfDfAjysReGYoIdkgwbyKZtqd1ZnI4VzqCuY9FjCt7tucjHfQESK qE2g== X-Gm-Message-State: AJaThX5ma9EKFvPlrotvhocZcKtGd4UYn0Wet3PMaX5miqNdNyMRW1vy 37VQXuRZs0hSr9VtNbx/bn2sMcSvL9M= X-Google-Smtp-Source: ABhQp+SdygJalU+nPLjpv9SSpJeasfFMzBSMsJd4TpMKohh8C3edas91mPhqb1isR7pkrcATEXtiMw== X-Received: by 10.80.184.106 with SMTP id k39mr2084872ede.276.1510312151316; Fri, 10 Nov 2017 03:09:11 -0800 (PST) Received: from localhost.localdomain ([2001:985:e54:1050::1000]) by smtp.gmail.com with ESMTPSA id c32sm7885543eda.57.2017.11.10.03.09.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Nov 2017 03:09:10 -0800 (PST) From: Steffan Karger <steffan@karger.me> To: openvpn-devel@lists.sourceforge.net Date: Fri, 10 Nov 2017 12:08:58 +0100 Message-Id: <20171110110858.11482-1-steffan@karger.me> X-Mailer: git-send-email 2.14.1 X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [74.125.82.68 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Headers-End: 1eD7BV-0000ZN-K1 Subject: [Openvpn-devel] [PATCH] Simplify and inline clear_buf() 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] Simplify and inline clear_buf()
|
|
Commit Message
Steffan Karger
Nov. 10, 2017, 12:08 a.m. UTC
Such a simple operation should not need a full function call.
Signed-off-by: Steffan Karger <steffan@karger.me>
---
src/openvpn/buffer.c | 8 --------
src/openvpn/buffer.h | 9 +++++++--
2 files changed, 7 insertions(+), 10 deletions(-)
Comments
ACK. Makes sense, simplifies things slightly, and passes all tests :)
Your patch has been applied to the master branch.
(I'm experimenting a bit with the formatting and the patchwork headers,
so do not wonder why the remainder looks a bit atypical)
commit 3280c4c2c7064c0c6719621703f46596212396fd
Author: Steffan Karger
Date: Fri Nov 10 12:08:58 2017 +0100
Simplify and inline clear_buf()
Signed-off-by: Steffan Karger <steffan@karger.me>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20171110110858.11482-1-steffan@karger.me>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg15796.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: Gert Doering <gert@greenie.muc.de>
X-Patchwork-State: Accepted
--
kind regards,
Gert Doering
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
HI, On Fri, Nov 10, 2017 at 03:37:56PM +0100, Gert Doering wrote: > ACK. Makes sense, simplifies things slightly, and passes all tests :) > > Your patch has been applied to the master branch. > > (I'm experimenting a bit with the formatting and the patchwork headers, > so do not wonder why the remainder looks a bit atypical) So, just for the record: > Acked-by: Gert Doering <gert@greenie.muc.de> *this* gets picked up nicely, if (and only if!) it's on the start of the line. (So, please send your ACKs in this format if you want patchwork to see them :-) ) > X-Patchwork-State: Accepted *this* is totally ignored, no matter whether it's in the body or header. More investigation needed... gert
diff --git a/src/openvpn/buffer.c b/src/openvpn/buffer.c index 7395ab29..4226a808 100644 --- a/src/openvpn/buffer.c +++ b/src/openvpn/buffer.c @@ -179,14 +179,6 @@ buf_assign(struct buffer *dest, const struct buffer *src) return buf_write(dest, BPTR(src), BLEN(src)); } -struct buffer -clear_buf(void) -{ - struct buffer buf; - CLEAR(buf); - return buf; -} - void free_buf(struct buffer *buf) { diff --git a/src/openvpn/buffer.h b/src/openvpn/buffer.h index a754fc14..a088e181 100644 --- a/src/openvpn/buffer.h +++ b/src/openvpn/buffer.h @@ -131,8 +131,6 @@ struct gc_arena void buf_clear(struct buffer *buf); -struct buffer clear_buf(void); - void free_buf(struct buffer *buf); bool buf_assign(struct buffer *dest, const struct buffer *src); @@ -213,6 +211,13 @@ gc_freeaddrinfo_callback(void *addr) freeaddrinfo((struct addrinfo *) addr); } +/** Return an empty struct buffer */ +static inline struct buffer +clear_buf(void) +{ + return (struct buffer) { 0 }; +} + static inline bool buf_defined(const struct buffer *buf) {