]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Fix various badly placed comments in preparation for reformat
authorFrank Lichtenheld <frank@lichtenheld.com>
Tue, 3 Jun 2025 16:30:34 +0000 (18:30 +0200)
committerGert Doering <gert@greenie.muc.de>
Tue, 3 Jun 2025 16:34:52 +0000 (18:34 +0200)
Change-Id: I83831060fdf5588a0ada8d6abbedc7ce3ded4182
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20250603163040.31169-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg31872.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/buffer.c
src/openvpn/multi_io.c
src/openvpn/networking.h
src/openvpn/options.c
src/openvpn/otime.c
src/openvpn/otime.h
src/openvpn/tun.h

index fd813230d8bfbae9572db5ab9a169903d1a260cc..dd6044b91e61a70b09d73b163b4ee3610b4397bb 100644 (file)
@@ -910,7 +910,8 @@ char_class(const unsigned char c, const unsigned int flags)
     {
         return true;
     }
-    if ((flags & CC_PRINT) && (c >= 32 && c != 127)) /* allow ascii non-control and UTF-8, consider DEL to be a control */
+    /* allow ascii non-control and UTF-8, consider DEL to be a control */
+    if ((flags & CC_PRINT) && (c >= 32 && c != 127))
     {
         return true;
     }
index 2bce272cca7a1745cfa9115eb71122ccf23b45e1..4854f4b969c5ab660379433f3c0902eb7138c8ad 100644 (file)
@@ -247,7 +247,8 @@ multi_io_wait_lite(struct multi_context *m, struct multi_instance *mi, const int
         case TA_TUN_WRITE:
             looking_for = TUN_WRITE;
             tun_input_pending = NULL;
-            c->c2.timeval.tv_sec = 1; /* For some reason, the Linux 2.2 TUN/TAP driver hits this timeout */
+            /* For some reason, the Linux 2.2 TUN/TAP driver hits this timeout */
+            c->c2.timeval.tv_sec = 1;
             perf_push(PERF_PROC_OUT_TUN_MTCP);
             io_wait(c, IOW_TO_TUN);
             perf_pop();
index 6f5a6d6189832f1cc19add62ce696a2f30477cd4..0ba49636d5e37c018c06b5381999a199be3b5ca1 100644 (file)
@@ -302,7 +302,7 @@ int net_route_v4_del(openvpn_net_ctx_t *ctx, const in_addr_t *dst,
                      int metric);
 
 /**
- * Delete a route for an IPv4 address/network
+ * Delete a route for an IPv6 address/network
  *
  * @param ctx       the implementation specific context
  * @param dst       the destination of the route
index b9708343b495120be675cb644db9eb04a2afb680..6ea01d4d03eb6bd18eb7b7855a8cc2f6d6314498 100644 (file)
@@ -8392,9 +8392,10 @@ add_option(struct options *options,
         VERIFY_PERMISSION(OPT_P_DHCPDNS);
         setenv_foreign_option(options, (const char **)p, 3, es);
     }
-    else if (streq(p[0], "route-method") && p[1] && !p[2]) /* ignore when pushed to non-Windows OS */
+    else if (streq(p[0], "route-method") && p[1] && !p[2])
     {
         VERIFY_PERMISSION(OPT_P_ROUTE_EXTRAS);
+        /* ignore when pushed to non-Windows OS */
     }
 #endif /* ifdef _WIN32 */
 #if PASSTOS_CAPABILITY
index e604a28b6e650a367516b8056e243f57d692e6ff..d423067275e19513699322018ea5c3daef9d9dbb 100644 (file)
@@ -44,8 +44,10 @@ time_t now_usec = 0;       /* GLOBAL */
 void
 update_now(const time_t system_time)
 {
-    const int forward_threshold = 86400; /* threshold at which to dampen forward jumps */
-    const int backward_trigger  = 10;  /* backward jump must be >= this many seconds before we adjust */
+    /* threshold at which to dampen forward jumps */
+    const int forward_threshold = 86400;
+    /* backward jump must be >= this many seconds before we adjust */
+    const int backward_trigger = 10;
     time_t real_time = system_time + now_adj;
 
     if (real_time > now)
index 5c3e86f637401b2e7a69a399d4ae247b957faa72..448389dcbe103a684649b76fe43dc77c16b4e60c 100644 (file)
@@ -246,7 +246,8 @@ tv_delta(struct timeval *dest, const struct timeval *t1, const struct timeval *t
 static inline bool
 tv_within_sigma(const struct timeval *t1, const struct timeval *t2, unsigned int sigma)
 {
-    const int delta = tv_subtract(t1, t2, TV_WITHIN_SIGMA_MAX_SEC); /* sigma should be less than 10 minutes */
+    /* sigma should be less than 10 minutes */
+    const int delta = tv_subtract(t1, t2, TV_WITHIN_SIGMA_MAX_SEC);
     return -(int)sigma <= delta && delta <= (int)sigma;
 }
 
index ec0f4daf5d974186531aa24aaff251138f6108c1..5407e4758db4ce66f53f054ccfd445b755aae471 100644 (file)
@@ -212,7 +212,8 @@ struct tuntap
 
 #ifdef _WIN32
     HANDLE hand;
-    OVERLAPPED dco_new_peer_ov; /* used for async NEW_PEER dco call, which might wait for TCP connect */
+    /* used for async NEW_PEER dco call, which might wait for TCP connect */
+    OVERLAPPED dco_new_peer_ov;
     struct overlapped_io reads;
     struct overlapped_io writes;
     struct rw_handle rw_handle;