]> 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:08:24 +0000 (18:08 +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>
src/openvpn/multi.c
src/openvpn/plugin.c
src/openvpn/socket_util.h
src/openvpn/tun.c
src/openvpn/xkey_helper.c
src/openvpn/xkey_provider.c
tests/unit_tests/openvpn/test_cryptoapi.c
tests/unit_tests/openvpn/test_pkcs11.c

index 85975ff59cbcd942323468631b5c3c9d7a21db65..7db4eda46c2c1e0ced8727d8ac97adcae617a20e 100644 (file)
@@ -1036,7 +1036,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 e65a3bcc2fbb40ab2e5a583e5fd3df082d36d547..ea76a084c1c0a811403d14d550e41b2ba38b48f3 100644 (file)
@@ -1007,7 +1007,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", ++count, l->name, l->value);
+            msg(msglevel, "[%d] '%s' -> '%s'", ++count, l->name, l->value);
             l = l->next;
         }
     }
index 5ea37dd8ac949f494ef07093c75fc0e485e28adb..361edff47cb4f91ecf05d61149045cf68d3d5d5b 100644 (file)
@@ -475,7 +475,7 @@ af_addr_size(sa_family_t af)
         default:
 #if 0
             /* could be called from socket_do_accept() with empty addr */
-            msg(M_ERR, "Bad address family: %d\n", af);
+            msg(M_ERR, "Bad address family: %d", af);
             ASSERT(0);
 #endif
             return 0;
index 6c3096b580314f857bd96a2b5bde2d71849d48d8..29f74a2f56cc3ca32cd92d02edb570625c1542f6 100644 (file)
@@ -2392,7 +2392,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;
@@ -2403,7 +2403,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)
@@ -2422,18 +2422,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 */
@@ -2443,7 +2443,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 3820808dbdf81ec73b9596a729b6c4f1f41132d9..72a24b5340abd66f47b2614f1fd1fd57e078aa1a 100644 (file)
@@ -53,7 +53,7 @@ print_openssl_errors(void)
     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));
     }
 }
 
@@ -429,7 +429,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 1819ab00f214da930fe2c5a03db11b3454c0b85d..168b5547e5bd9ee6273644a5e3f113e391e540d6 100644 (file)
@@ -944,7 +944,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 0cfc952edfd54e0f20d17fe6725f745610ced178..6e83465136fd72b73fee2f969f2562e8e102469d 100644 (file)
@@ -64,7 +64,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));
     }
 }
 
index 56125df9c9df0efb08fb712a7d8abccd138db102..9ba6cfc20ccc7eb9acc1f4c6f6b36682f54061e4 100644 (file)
@@ -52,7 +52,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));
     }
 }
 
@@ -170,7 +170,7 @@ get_user_pass_cr(struct user_pass *up, const char *auth_file, const char *prefix
     }
     else
     {
-        msg(M_NONFATAL, "ERROR: get_user_pass called with unknown request <%s> ignored\n", prefix);
+        msg(M_NONFATAL, "ERROR: get_user_pass called with unknown request <%s> ignored", prefix);
         ret = false;
     }