Message ID | 20220621161649.2872985-2-arne@rfc2549.org |
---|---|
State | Accepted |
Headers | show |
Series | [Openvpn-devel,1/6] Remove leftover frame_set_mtu_dynamic definitions in mtu.h | expand |
Acked-by: Gert Doering <gert@greenie.muc.de> Trivial enough. Only compile tested (+stare at code). Your patch has been applied to the master branch. commit 65c6308608e5a637564db0cf241a16501190342a Author: Arne Schwabe Date: Tue Jun 21 18:16:45 2022 +0200 Inline frame_add_to_extra_tun function and remove frame_defined 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> -- kind regards, 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 */
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> --- src/openvpn/init.c | 2 +- src/openvpn/mtu.h | 16 ---------------- 2 files changed, 1 insertion(+), 17 deletions(-)