]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
remove newline characters at the end of msg() calls
authorGert Doering <gert@greenie.muc.de>
Fri, 12 Sep 2025 13:16:09 +0000 (15:16 +0200)
committerGert Doering <gert@greenie.muc.de>
Fri, 12 Sep 2025 16:11:55 +0000 (18:11 +0200)
Unlike debugging with printf(), or msg() calls do not need or want
a '\n' at the end of the string.  Remove those that were overlooked.

Change-Id: I889b53ed72efaec546a6609491fae9715726ea00
Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: Frank Lichtenheld <frank@lichtenheld.com>
Message-Id: <20250912131609.43444-1-frank@lichtenheld.com>
URL: https://sourceforge.net/p/openvpn/mailman/message/59232448/
URL: https://gerrit.openvpn.net/c/openvpn/+/1180
Signed-off-by: Gert Doering <gert@greenie.muc.de>
(cherry picked from commit 340b5b2d264a47c24aa948efb83ffa04e0e9c7e2)

src/openvpn/multi.c
src/openvpn/plugin.c
src/openvpn/tun.c
src/openvpn/xkey_helper.c
src/openvpn/xkey_provider.c
tests/unit_tests/openvpn/test_cryptoapi.c

index 310211c7cc523a12cb26b0e9252aae58ebae4fe8..e1c0b02bac44ff097fb60251d86649a7dad7f309 100644 (file)
@@ -1041,7 +1041,7 @@ multi_print_status(struct multi_context *m, struct status_output *so, const int
 #ifdef ENABLE_ASYNC_PUSH
     if (m->inotify_watchers)
     {
-        msg(D_MULTI_DEBUG, "inotify watchers count: %d\n", hash_n_elements(m->inotify_watchers));
+        msg(D_MULTI_DEBUG, "inotify watchers count: %d", hash_n_elements(m->inotify_watchers));
     }
 #endif
 }
index 2ad459cd3f518fbce8386bbdc32b22519aa1d25b..d615201b28567a75264b8ebab514359a8e0c8504 100644 (file)
@@ -1036,7 +1036,7 @@ plugin_return_print(const int msglevel, const char *prefix, const struct plugin_
         msg(msglevel, "PLUGIN #%d (%s)", i, prefix);
         while (l)
         {
-            msg(msglevel, "[%d] '%s' -> '%s'\n",
+            msg(msglevel, "[%d] '%s' -> '%s'",
                 ++count,
                 l->name,
                 l->value);
index 92e71a399e301b875e9ef6a4b4b784510b37bdfa..89d5f9320c4399156f9ee4718a2943dca1baf03e 100644 (file)
@@ -2530,7 +2530,7 @@ open_tun(const char *dev, const char *dev_type, const char *dev_node, struct tun
     {
         if (ioctl(if_fd, SIOCGLIFFLAGS, &ifr) < 0)
         {
-            msg(M_ERR, "Can't get flags\n");
+            msg(M_ERR, "Can't get flags");
         }
         strncpynt(ifr.lifr_name, tt->actual_name, sizeof(ifr.lifr_name));
         ifr.lifr_ppa = ppa;
@@ -2541,7 +2541,7 @@ open_tun(const char *dev, const char *dev_type, const char *dev_node, struct tun
         }
         if (ioctl(if_fd, SIOCGLIFFLAGS, &ifr) <0)
         {
-            msg(M_ERR, "Can't get flags\n");
+            msg(M_ERR, "Can't get flags");
         }
         /* Push arp module to if_fd */
         if (ioctl(if_fd, I_PUSH, "arp") < 0)
@@ -2560,18 +2560,18 @@ open_tun(const char *dev, const char *dev_type, const char *dev_node, struct tun
         /* Push arp module to ip_fd */
         if (ioctl(tt->ip_fd, I_PUSH, "arp") < 0)
         {
-            msg(M_ERR, "Can't push ARP module\n");
+            msg(M_ERR, "Can't push ARP module");
         }
 
         /* Open arp_fd */
         if ((arp_fd = open(arp_node, O_RDWR, 0)) < 0)
         {
-            msg(M_ERR, "Can't open %s\n", arp_node);
+            msg(M_ERR, "Can't open %s", arp_node);
         }
         /* Push arp module to arp_fd */
         if (ioctl(arp_fd, I_PUSH, "arp") < 0)
         {
-            msg(M_ERR, "Can't push ARP module\n");
+            msg(M_ERR, "Can't push ARP module");
         }
 
         /* Set ifname to arp */
@@ -2581,7 +2581,7 @@ open_tun(const char *dev, const char *dev_type, const char *dev_node, struct tun
         strioc_if.ic_dp = (char *)&ifr;
         if (ioctl(arp_fd, I_STR, &strioc_if) < 0)
         {
-            msg(M_ERR, "Can't set ifname to arp\n");
+            msg(M_ERR, "Can't set ifname to arp");
         }
     }
 
index c803323262899dea07b7705a7bb76a7b10994446..4c470f01dd82792bb918be0cba30d83b94693998 100644 (file)
@@ -54,7 +54,7 @@ print_openssl_errors()
     unsigned long e;
     while ((e = ERR_get_error()))
     {
-        msg(M_WARN, "OpenSSL error %lu: %s\n", e, ERR_error_string(e, NULL));
+        msg(M_WARN, "OpenSSL error %lu: %s", e, ERR_error_string(e, NULL));
     }
 }
 
@@ -431,7 +431,7 @@ ecdsa_bin2der(unsigned char *buf, int len, size_t capacity)
     if (derlen > (int) capacity)
     {
         ECDSA_SIG_free(ecsig);
-        msg(M_NONFATAL, "Error: DER encoded ECDSA signature is too long (%d)\n", derlen);
+        msg(M_NONFATAL, "Error: DER encoded ECDSA signature is too long (%d)", derlen);
         return 0;
     }
     derlen = i2d_ECDSA_SIG(ecsig, &buf);
index f5fc9568a4c340a7e1ae0c87b2188f623cbb8a22..f69239dde4e577b04a48d6bec0ff9c72a46624be 100644 (file)
@@ -939,7 +939,7 @@ static int
 signature_sign(void *ctx, unsigned char *sig, size_t *siglen, size_t sigsize,
                const unsigned char *tbs, size_t tbslen)
 {
-    xkey_dmsg(D_XKEY, "entry with siglen = %zu\n", *siglen);
+    xkey_dmsg(D_XKEY, "entry with siglen = %zu", *siglen);
 
     XKEY_SIGNATURE_CTX *sctx = ctx;
     ASSERT(sctx);
index ddbe2bc316f7aa6e2fa314430e2543f460d29ea3..18e38d0fb6031f29995fe8f5b2da4e1200b87c80 100644 (file)
@@ -65,7 +65,7 @@ crypto_print_openssl_errors(const unsigned int flags)
     unsigned long e;
     while ((e = ERR_get_error()))
     {
-        msg(flags, "OpenSSL error %lu: %s\n", e, ERR_error_string(e, NULL));
+        msg(flags, "OpenSSL error %lu: %s", e, ERR_error_string(e, NULL));
     }
 }