From: Arne Schwabe Date: Tue, 21 Jun 2022 16:16:45 +0000 (+0200) Subject: Inline frame_add_to_extra_tun function and remove frame_defined X-Git-Tag: v2.6_beta1~181 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=65c6308608e5a637564db0cf241a16501190342a;p=thirdparty%2Fopenvpn.git Inline frame_add_to_extra_tun function and remove frame_defined 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 Acked-by: Gert Doering 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 --- diff --git a/src/openvpn/init.c b/src/openvpn/init.c index f06afc298..6cdcef628 100644 --- a/src/openvpn/init.c +++ b/src/openvpn/init.c @@ -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; } /* diff --git a/src/openvpn/mtu.h b/src/openvpn/mtu.h index 4b8feca7c..9db6cf26a 100644 --- a/src/openvpn/mtu.h +++ b/src/openvpn/mtu.h @@ -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 */