[Openvpn-devel,v1] Make read/write_tun_header static

Message ID 20240916133436.29943-1-gert@greenie.muc.de
State Accepted
Headers show
Series [Openvpn-devel,v1] Make read/write_tun_header static | expand

Commit Message

Gert Doering Sept. 16, 2024, 1:34 p.m. UTC
From: Arne Schwabe <arne@rfc2549.org>

These functions are not used outside tun.c

Change-Id: I028634dba74a273c725b0beb16b674897b3c23fa
Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Gert Doering <gert@greenie.muc.de>
---

This change was reviewed on Gerrit and approved by at least one
developer. I request to merge it to master.

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/745
This mail reflects revision 1 of this Change.

Acked-by according to Gerrit (reflected above):
Gert Doering <gert@greenie.muc.de>

Comments

Gert Doering Sept. 16, 2024, 2:58 p.m. UTC | #1
Verified that it's not used outside tun.c, test built OpenBSD (which
uses this).

Your patch has been applied to the master branch.

commit ac3a7fd93542420f12d58e5c7490076b5741fb5a
Author: Arne Schwabe
Date:   Mon Sep 16 15:34:35 2024 +0200

     Make read/write_tun_header static

     Signed-off-by: Arne Schwabe <arne@rfc2549.org>
     Acked-by: Gert Doering <gert@greenie.muc.de>
     Message-Id: <20240916133436.29943-1-gert@greenie.muc.de>
     Signed-off-by: Gert Doering <gert@greenie.muc.de>
     URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg29249.html


--
kind regards,

Gert Doering

Patch

diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c
index 1f0eadd..0832375 100644
--- a/src/openvpn/tun.c
+++ b/src/openvpn/tun.c
@@ -1822,7 +1822,7 @@ 
     }
 }
 
-int
+static int
 write_tun_header(struct tuntap *tt, uint8_t *buf, int len)
 {
     if (tt->type == DEV_TYPE_TUN)
@@ -1855,7 +1855,7 @@ 
     }
 }
 
-int
+static int
 read_tun_header(struct tuntap *tt, uint8_t *buf, int len)
 {
     if (tt->type == DEV_TYPE_TUN)