[Openvpn-devel,1/2] config-version.h: remove unused includes

Message ID 20220804150301.62856-1-frank@lichtenheld.com
State Changes Requested
Headers show
Series [Openvpn-devel,1/2] config-version.h: remove unused includes | expand

Commit Message

Frank Lichtenheld Aug. 4, 2022, 5:03 a.m. UTC
We only need to include this when we want the
git version. This is currently only the case
in options.c

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
---
 src/openvpn/block_dns.c | 3 ---
 src/openvpn/plugin.c    | 3 ---
 src/tapctl/main.c       | 3 ---
 3 files changed, 9 deletions(-)

Comments

Gert Doering Aug. 6, 2022, 12:38 a.m. UTC | #1
Hi,

On Thu, Aug 04, 2022 at 05:03:00PM +0200, Frank Lichtenheld wrote:
> We only need to include this when we want the
> git version. This is currently only the case
> in options.c

Feature-ACK, but NAK on this hunk:

> diff --git a/src/openvpn/plugin.c b/src/openvpn/plugin.c
> index 51136fea..dc7fd459 100644
> --- a/src/openvpn/plugin.c
> +++ b/src/openvpn/plugin.c
> @@ -26,9 +26,6 @@
>  #elif defined(_MSC_VER)
>  #include "config-msvc.h"
>  #endif
> -#ifdef HAVE_CONFIG_VERSION_H
> -#include "config-version.h"
> -#endif

plugin.c actually uses CONFIGURE_GIT_REVISION for the openvpn version
visible to plugins

#ifndef CONFIGURE_GIT_REVISION
#define _OPENVPN_PATCH_LEVEL OPENVPN_VERSION_PATCH
#else
#define _OPENVPN_PATCH_LEVEL "git:" CONFIGURE_GIT_REVISION CONFIGURE_GIT_FLAGS
#endif
...
            struct openvpn_plugin_args_open_in args = { p->plugin_type_mask,
...
                                                        _OPENVPN_PATCH_LEVEL};


The other two (block_dns.c and tapctl.c) can go.

gert

Patch

diff --git a/src/openvpn/block_dns.c b/src/openvpn/block_dns.c
index 88e933fb..7849ec53 100644
--- a/src/openvpn/block_dns.c
+++ b/src/openvpn/block_dns.c
@@ -28,9 +28,6 @@ 
 #elif defined(_MSC_VER)
 #include "config-msvc.h"
 #endif
-#ifdef HAVE_CONFIG_VERSION_H
-#include "config-version.h"
-#endif
 
 #include "syshead.h"
 
diff --git a/src/openvpn/plugin.c b/src/openvpn/plugin.c
index 51136fea..dc7fd459 100644
--- a/src/openvpn/plugin.c
+++ b/src/openvpn/plugin.c
@@ -26,9 +26,6 @@ 
 #elif defined(_MSC_VER)
 #include "config-msvc.h"
 #endif
-#ifdef HAVE_CONFIG_VERSION_H
-#include "config-version.h"
-#endif
 
 #include "syshead.h"
 
diff --git a/src/tapctl/main.c b/src/tapctl/main.c
index df73a965..e13549bf 100644
--- a/src/tapctl/main.c
+++ b/src/tapctl/main.c
@@ -24,9 +24,6 @@ 
 #elif defined(_MSC_VER)
 #include <config-msvc.h>
 #endif
-#ifdef HAVE_CONFIG_VERSION_H
-#include <config-version.h>
-#endif
 
 #include "tap.h"
 #include "error.h"