Browse code

Fix various badly placed comments in preparation for reformat

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>

Frank Lichtenheld authored on 2025/06/04 01:30:34
Showing 7 changed files
... ...
@@ -910,7 +910,8 @@ char_class(const unsigned char c, const unsigned int flags)
910 910
     {
911 911
         return true;
912 912
     }
913
-    if ((flags & CC_PRINT) && (c >= 32 && c != 127)) /* allow ascii non-control and UTF-8, consider DEL to be a control */
913
+    /* allow ascii non-control and UTF-8, consider DEL to be a control */
914
+    if ((flags & CC_PRINT) && (c >= 32 && c != 127))
914 915
     {
915 916
         return true;
916 917
     }
... ...
@@ -247,7 +247,8 @@ multi_io_wait_lite(struct multi_context *m, struct multi_instance *mi, const int
247 247
         case TA_TUN_WRITE:
248 248
             looking_for = TUN_WRITE;
249 249
             tun_input_pending = NULL;
250
-            c->c2.timeval.tv_sec = 1; /* For some reason, the Linux 2.2 TUN/TAP driver hits this timeout */
250
+            /* For some reason, the Linux 2.2 TUN/TAP driver hits this timeout */
251
+            c->c2.timeval.tv_sec = 1;
251 252
             perf_push(PERF_PROC_OUT_TUN_MTCP);
252 253
             io_wait(c, IOW_TO_TUN);
253 254
             perf_pop();
... ...
@@ -302,7 +302,7 @@ int net_route_v4_del(openvpn_net_ctx_t *ctx, const in_addr_t *dst,
302 302
                      int metric);
303 303
 
304 304
 /**
305
- * Delete a route for an IPv4 address/network
305
+ * Delete a route for an IPv6 address/network
306 306
  *
307 307
  * @param ctx       the implementation specific context
308 308
  * @param dst       the destination of the route
... ...
@@ -8392,9 +8392,10 @@ add_option(struct options *options,
8392 8392
         VERIFY_PERMISSION(OPT_P_DHCPDNS);
8393 8393
         setenv_foreign_option(options, (const char **)p, 3, es);
8394 8394
     }
8395
-    else if (streq(p[0], "route-method") && p[1] && !p[2]) /* ignore when pushed to non-Windows OS */
8395
+    else if (streq(p[0], "route-method") && p[1] && !p[2])
8396 8396
     {
8397 8397
         VERIFY_PERMISSION(OPT_P_ROUTE_EXTRAS);
8398
+        /* ignore when pushed to non-Windows OS */
8398 8399
     }
8399 8400
 #endif /* ifdef _WIN32 */
8400 8401
 #if PASSTOS_CAPABILITY
... ...
@@ -44,8 +44,10 @@ time_t now_usec = 0;       /* GLOBAL */
44 44
 void
45 45
 update_now(const time_t system_time)
46 46
 {
47
-    const int forward_threshold = 86400; /* threshold at which to dampen forward jumps */
48
-    const int backward_trigger  = 10;  /* backward jump must be >= this many seconds before we adjust */
47
+    /* threshold at which to dampen forward jumps */
48
+    const int forward_threshold = 86400;
49
+    /* backward jump must be >= this many seconds before we adjust */
50
+    const int backward_trigger = 10;
49 51
     time_t real_time = system_time + now_adj;
50 52
 
51 53
     if (real_time > now)
... ...
@@ -246,7 +246,8 @@ tv_delta(struct timeval *dest, const struct timeval *t1, const struct timeval *t
246 246
 static inline bool
247 247
 tv_within_sigma(const struct timeval *t1, const struct timeval *t2, unsigned int sigma)
248 248
 {
249
-    const int delta = tv_subtract(t1, t2, TV_WITHIN_SIGMA_MAX_SEC); /* sigma should be less than 10 minutes */
249
+    /* sigma should be less than 10 minutes */
250
+    const int delta = tv_subtract(t1, t2, TV_WITHIN_SIGMA_MAX_SEC);
250 251
     return -(int)sigma <= delta && delta <= (int)sigma;
251 252
 }
252 253
 
... ...
@@ -212,7 +212,8 @@ struct tuntap
212 212
 
213 213
 #ifdef _WIN32
214 214
     HANDLE hand;
215
-    OVERLAPPED dco_new_peer_ov; /* used for async NEW_PEER dco call, which might wait for TCP connect */
215
+    /* used for async NEW_PEER dco call, which might wait for TCP connect */
216
+    OVERLAPPED dco_new_peer_ov;
216 217
     struct overlapped_io reads;
217 218
     struct overlapped_io writes;
218 219
     struct rw_handle rw_handle;