]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Inline frame_add_to_extra_tun function and remove frame_defined
authorArne Schwabe <arne@rfc2549.org>
Tue, 21 Jun 2022 16:16:45 +0000 (18:16 +0200)
committerGert Doering <gert@greenie.muc.de>
Tue, 21 Jun 2022 20:50:49 +0000 (22:50 +0200)
This function has only one usage and is so trivial that an extra
function makes little sense anymore.

frame_defined is no longer used, so remove the function.

Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20220621161649.2872985-2-arne@rfc2549.org>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg24492.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/init.c
src/openvpn/mtu.h

index f06afc2980b4e91d784bfec958df84be675abe76..6cdcef6280f3bc775cad2f7d61e67841c4280016 100644 (file)
@@ -3047,7 +3047,7 @@ do_init_frame(struct context *c)
      */
     if (c->options.ce.tun_mtu_extra_defined)
     {
-        frame_add_to_extra_tun(&c->c2.frame, c->options.ce.tun_mtu_extra);
+        c->c2.frame.extra_tun += c->options.ce.tun_mtu_extra;
     }
 
     /*
index 4b8feca7cd30716b1c5f2307206421a8ab63cd33..9db6cf26aeb06fac507728016420d4cacbda8da0 100644 (file)
@@ -274,20 +274,4 @@ const char *format_extended_socket_error(int fd, int *mtu, struct gc_arena *gc);
 
 #endif
 
-/*
- * frame member adjustment functions
- */
-
-static inline void
-frame_add_to_extra_tun(struct frame *frame, const int increment)
-{
-    frame->extra_tun += increment;
-}
-
-static inline bool
-frame_defined(const struct frame *frame)
-{
-    return frame->buf.payload_size > 0;
-}
-
 #endif /* ifndef MTU_H */