From: "cron2 (Code Review)" Date: Fri, 12 Sep 2025 16:13:39 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: <50f9a370ebbb7a19b3b89983996a85ff159c580f-EmailReplacePatchSet-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="5WAWB1ZA5JM="; charset=UTF-8 Subject: [Openvpn-devel] [S] Change in openvpn[master]: remove newline characters at the end of msg() calls List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos , flichtenheld Cc: openvpn-devel --5WAWB1ZA5JM= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello flichtenheld, plaisthos, I'd like you to reexamine a change. Please visit http://gerrit.openvpn.net/c/openvpn/+/1180?usp=3Demail to look at the new patch set (#2). The following approvals got outdated and were removed: Code-Review+2 by flichtenheld Change subject: remove newline characters at the end of msg() calls ...................................................................... remove newline characters at the end of msg() calls 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 Acked-by: Frank Lichtenheld Message-Id: <20250912131609.43444-1-frank@...2641...> URL: https://sourceforge.net/p/openvpn/mailman/message/59232448/ URL: https://gerrit.openvpn.net/c/openvpn/+/1180 Signed-off-by: Gert Doering --- M src/openvpn/multi.c M src/openvpn/plugin.c M src/openvpn/socket_util.h M src/openvpn/tun.c M src/openvpn/xkey_helper.c M src/openvpn/xkey_provider.c M tests/unit_tests/openvpn/test_cryptoapi.c M tests/unit_tests/openvpn/test_pkcs11.c 8 files changed, 15 insertions(+), 15 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/80/1180/2 diff --git a/src/openvpn/multi.c b/src/openvpn/multi.c index 85975ff..7db4eda 100644 --- a/src/openvpn/multi.c +++ b/src/openvpn/multi.c @@ -1036,7 +1036,7 @@ #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 } diff --git a/src/openvpn/plugin.c b/src/openvpn/plugin.c index e65a3bc..ea76a08 100644 --- a/src/openvpn/plugin.c +++ b/src/openvpn/plugin.c @@ -1007,7 +1007,7 @@ msg(msglevel, "PLUGIN #%d (%s)", i, prefix); while (l) { - msg(msglevel, "[%d] '%s' -> '%s'\n", ++count, l->name, l->valu= e); + msg(msglevel, "[%d] '%s' -> '%s'", ++count, l->name, l->value); l =3D l->next; } } diff --git a/src/openvpn/socket_util.h b/src/openvpn/socket_util.h index 5ea37dd..361edff 100644 --- a/src/openvpn/socket_util.h +++ b/src/openvpn/socket_util.h @@ -475,7 +475,7 @@ 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; diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c index 6c3096b..29f74a2 100644 --- a/src/openvpn/tun.c +++ b/src/openvpn/tun.c @@ -2392,7 +2392,7 @@ { 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 =3D ppa; @@ -2403,7 +2403,7 @@ } 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 @@ /* 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 =3D 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 @@ strioc_if.ic_dp =3D (char *)𝔦 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"); } } diff --git a/src/openvpn/xkey_helper.c b/src/openvpn/xkey_helper.c index 3820808..72a24b5 100644 --- a/src/openvpn/xkey_helper.c +++ b/src/openvpn/xkey_helper.c @@ -53,7 +53,7 @@ unsigned long e; while ((e =3D 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 @@ 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 =3D i2d_ECDSA_SIG(ecsig, &buf); diff --git a/src/openvpn/xkey_provider.c b/src/openvpn/xkey_provider.c index 1819ab0..168b554 100644 --- a/src/openvpn/xkey_provider.c +++ b/src/openvpn/xkey_provider.c @@ -944,7 +944,7 @@ signature_sign(void *ctx, unsigned char *sig, size_t *siglen, size_t sigsi= ze, const unsigned char *tbs, size_t tbslen) { - xkey_dmsg(D_XKEY, "entry with siglen =3D %zu\n", *siglen); + xkey_dmsg(D_XKEY, "entry with siglen =3D %zu", *siglen); XKEY_SIGNATURE_CTX *sctx =3D ctx; ASSERT(sctx); diff --git a/tests/unit_tests/openvpn/test_cryptoapi.c b/tests/unit_tests/o= penvpn/test_cryptoapi.c index 0cfc952..6e83465 100644 --- a/tests/unit_tests/openvpn/test_cryptoapi.c +++ b/tests/unit_tests/openvpn/test_cryptoapi.c @@ -64,7 +64,7 @@ unsigned long e; while ((e =3D 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)); } } diff --git a/tests/unit_tests/openvpn/test_pkcs11.c b/tests/unit_tests/open= vpn/test_pkcs11.c index 56125df..9ba6cfc 100644 --- a/tests/unit_tests/openvpn/test_pkcs11.c +++ b/tests/unit_tests/openvpn/test_pkcs11.c @@ -52,7 +52,7 @@ unsigned long e; while ((e =3D 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 @@ } 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 =3D false; } -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1180?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I889b53ed72efaec546a6609491fae9715726ea00 Gerrit-Change-Number: 1180 Gerrit-PatchSet: 2 Gerrit-Owner: cron2 Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-MessageType: newpatchset --5WAWB1ZA5JM= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 uploaded patch set #2 to this change.

View Change

The following approvals got outdated and were removed: Code-Review+2 by flichtenheld

remove newline characters at the end of msg()=
 calls

Unlike debugging with printf(), or msg() calls do not need or= want
a '\n' at the end of the string. Remove those that were o= verlooked.

Change-Id: I889b53ed72efaec546a6609491fae9715726ea00
S= igned-off-by: Gert Doering <gert@...1296...>
Acked-by: Frank Licht= enheld <frank@...2641...>
Message-Id: <20250912131609.43444-1-f= rank@...2641...>
URL: https://sourceforge.net/p/openvpn/mailman/messa= ge/59232448/
URL: https://gerrit.openvpn.net/c/openvpn/+/1180
Signed-= off-by: Gert Doering <gert@...1296...>
---
M src/openvpn/multi.= c
M src/openvpn/plugin.c
M src/openvpn/socket_util.h
M src/openvpn= /tun.c
M src/openvpn/xkey_helper.c
M src/openvpn/xkey_provider.c
M= tests/unit_tests/openvpn/test_cryptoapi.c
M tests/unit_tests/openvpn/te= st_pkcs11.c
8 files changed, 15 insertions(+), 15 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/80/1180/2
<=
span>diff --git a/src/openvpn/multi.c b/src/openvpn/multi.c
index 85975ff..7db4eda 100644
--- a/src/openvpn/multi.c
+++ b/src/openvpn/multi.c
@@ -1036,7 +1036,7 = @@
#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, "inotif= y watchers count: %d", hash_n_elements(m->inotify_watchers));

}
#endif
}
diff --git a/src/openvpn/plugin.c b/src/openvpn/plugin.c
= index e65a3bc..ea76a08 100644
--- a/src/openvpn/plugin.c
+++ b/src/openvpn/plugin.c
@@ -1007,7 +1007,7= @@
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 =3D l->next;<= /span>
}
}
diff --gi= t a/src/openvpn/socket_util.h b/src/openvpn/socket_util.h
i= ndex 5ea37dd..361edff 100644
--- a/src/openvpn/socket_util.= h
+++ b/src/openvpn/socket_util.h
@@ -475,7= +475,7 @@
default:
#if 0<= br> /* could be called from socket_do_accept() with empty= addr */
- m= sg(M_ERR, "Bad address family: %d\n", af);
+ msg(M_ERR, "Bad address = family: %d", af);
ASSERT(0);
#endif

return 0;
diff --g= it a/src/openvpn/tun.c b/src/openvpn/tun.c
index 6c3096b..2= 9f74a2 100644
--- a/src/openvpn/tun.c
+++ b= /src/openvpn/tun.c
@@ -2392,7 +2392,7 @@
= {
if (ioctl(if_fd, SIOCGLIFFLAGS, &ifr) <= ; 0)
{
- msg(M_ERR, "Can't get flags\n");=
+ msg(M_ERR, &qu= ot;Can't get flags");
}
= strncpynt(ifr.lifr_name, tt->actual_name, sizeof(ifr.lifr_name))= ;
ifr.lifr_ppa =3D ppa;
@@ -2403,7= +2403,7 @@
}
if (ioctl(i= f_fd, SIOCGLIFFLAGS, &ifr) < 0)
{- msg(M_ERR, "Ca= n'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 @@
/* 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 =3D open(arp_node, O_RDWR, 0)) <= 0)
{
- msg(M_ERR, "Can't open %s\n", arp_node);=
+ msg(M_E= RR, "Can't open %s", arp_node);
}
/* Push arp module to arp_fd */
= if (ioctl(arp_fd, I_PUSH, "arp") < 0)
= {
- ms= g(M_ERR, "Can't push ARP module\n");
+ msg(M_ERR, "Can't push = ARP module");
}

<= span> /* Set ifname to arp */

@@ -2443,7 +2443,7 @@=
strioc_if.ic_dp =3D (char *)&ifr;
<= span> if (ioctl(arp_fd, I_STR, &strioc_if) < 0)

{

- = msg(M_ERR, "Can't set ifname to arp\n");
+ msg(M_ERR, "Can= 9;t set ifname to arp");
}
= }

diff --git a/src/openvpn/xkey_helper= .c b/src/openvpn/xkey_helper.c
index 3820808..72a24b5 10064= 4
--- a/src/openvpn/xkey_helper.c
+++ b/src= /openvpn/xkey_helper.c
@@ -53,7 +53,7 @@
= unsigned long e;
while ((e =3D 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 @@

if (derlen > (int)capacity)=
{
ECDSA_SIG_free(ecsig);
- msg(M_NONFATAL, &= quot;Error: DER encoded ECDSA signature is too long (%d)\n", derlen);<= /span>
+ msg(M_NONFAT= AL, "Error: DER encoded ECDSA signature is too long (%d)", derlen= );
return 0;
}
derlen =3D i2d_ECDSA_SIG(ecsig, &buf);

diff --gi= t a/src/openvpn/xkey_provider.c b/src/openvpn/xkey_provider.c
index 1819ab0..168b554 100644

--- a/src/openvpn/xkey_pro= vider.c
+++ b/src/openvpn/xkey_provider.c
@= @ -944,7 +944,7 @@
signature_sign(void *ctx, unsigned char= *sig, size_t *siglen, size_t sigsize,
cons= t unsigned char *tbs, size_t tbslen)
{
- xkey_dmsg(D_XKEY, "entry with si= glen =3D %zu\n", *siglen);
+ xkey_dmsg(D_XKEY, "entry with siglen =3D %zu", *s= iglen);

XKEY_SIGNATURE_CTX *sctx =3D= ctx;
ASSERT(sctx);
diff --git a/tests= /unit_tests/openvpn/test_cryptoapi.c b/tests/unit_tests/openvpn/test_crypto= api.c
index 0cfc952..6e83465 100644
--- a/t= ests/unit_tests/openvpn/test_cryptoapi.c
+++ b/tests/unit_t= ests/openvpn/test_cryptoapi.c
@@ -64,7 +64,7 @@
<= span> unsigned long e;
while ((e =3D 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));
}
}
<= br>diff --git a/tests/unit_tests/openvpn/test_pkcs11.c b/tests/unit_t= ests/openvpn/test_pkcs11.c
index 56125df..9ba6cfc 100644
--- a/tests/unit_tests/openvpn/test_pkcs11.c
= +++ b/tests/unit_tests/openvpn/test_pkcs11.c
@@ -52,7 +52,7= @@
unsigned long e;
while ((e = =3D ERR_get_error()))
{
- msg(flags, "OpenSSL error %lu: %s\n&quo= t;, e, ERR_error_string(e, NULL));
+ msg(flags, "OpenSSL error %lu: %s", e, ERR= _error_string(e, NULL));
}
}
@@ -170,7 +170,7 @@
}=
else
{
- msg(M_NONFATAL, "ERROR: get_user_pass cal= led with unknown request <%s> ignored\n", prefix);
+ msg(M_NONFATAL, "ERR= OR: get_user_pass called with unknown request <%s> ignored", pre= fix);

ret =3D false;
}=


To view, visit change 1180. To = unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I889b53ed72efaec546a6609491f= ae9715726ea00
Gerrit-Change-Number: 1180
Gerrit-PatchSet: 2
Gerrit-Owner: cron2 <gert@...1296...>
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-MessageType: newpatchset
--5WAWB1ZA5JM=--