]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Remove superflous ifdefs around enum like defines
authorArne Schwabe <arne@rfc2549.org>
Thu, 1 Apr 2021 13:13:25 +0000 (15:13 +0200)
committerGert Doering <gert@greenie.muc.de>
Thu, 1 Apr 2021 13:27:58 +0000 (15:27 +0200)
The variables are not used without the configured options but the
ifdef around them does not help readibility either.

Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20210401131337.3684-3-arne@rfc2549.org>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg21958.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/mtcp.c
src/openvpn/mudp.c
src/openvpn/openvpn.h

index 22c824aaa7954a9d6b080dc9b2bcb3e8a2d0fc7e..7d2a69b991eb1160fcc8e99ebaeee47407955468 100644 (file)
 #define MTCP_SOCKET      ((void *)1)
 #define MTCP_TUN         ((void *)2)
 #define MTCP_SIG         ((void *)3) /* Only on Windows */
-#ifdef ENABLE_MANAGEMENT
 #define MTCP_MANAGEMENT ((void *)4)
-#endif
-
-#ifdef ENABLE_ASYNC_PUSH
 #define MTCP_FILE_CLOSE_WRITE ((void *)5)
-#endif
 
 #define MTCP_N           ((void *)16) /* upper bound on MTCP_x */
 
index e95a7ac81d22f2d118920585bc13eae0bca5dfac..5af1081fc38137eee24535c36278223a5d2bf18f 100644 (file)
@@ -195,12 +195,10 @@ multi_process_io_udp(struct multi_context *m)
     {
         strcat(buf, "TW/");
     }
-#ifdef ENABLE_ASYNC_PUSH
     else if (status & FILE_CLOSED)
     {
         strcat(buf, "FC/");
     }
-#endif
     printf("IO %s\n", buf);
 #endif /* ifdef MULTI_DEBUG_EVENT_LOOP */
 
index 3cef26381a075175cf1b01ad6db5d0d946b59b96..1063351d3942bba25a18de2171b739c4d799f2d0 100644 (file)
@@ -252,13 +252,9 @@ struct context_2
 #define TUN_WRITE         (1<<3)
 #define ES_ERROR          (1<<4)
 #define ES_TIMEOUT        (1<<5)
-#ifdef ENABLE_MANAGEMENT
 #define MANAGEMENT_READ  (1<<6)
 #define MANAGEMENT_WRITE (1<<7)
-#endif
-#ifdef ENABLE_ASYNC_PUSH
 #define FILE_CLOSED       (1<<8)
-#endif
 
     unsigned int event_set_status;