From: "cron2 (Code Review)" Date: Sun, 17 Aug 2025 14:44:31 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: <0480e8595f45c3bf5741d4bccfb8a1672d0093b8-EmailReplacePatchSet-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="47hvxVrQqkQ="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: Collect trivial conversion fixes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: flichtenheld , plaisthos Cc: openvpn-devel --47hvxVrQqkQ= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable cron2 has uploaded a new patch set (#4) to the change originally created by= flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1140?usp=3Demail ) The following approvals got outdated and were removed: Code-Review+2 by cron2 Change subject: Collect trivial conversion fixes ...................................................................... Collect trivial conversion fixes These are very local, simple fixes that do not warrant their own commit. Change-Id: Id565ec17856444b580dd89edab92e9fe18d39b77 Signed-off-by: Frank Lichtenheld Acked-by: Gert Doering Message-Id: <20250817143922.17988-1-gert@...1296...> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg32= 611.html Signed-off-by: Gert Doering --- M src/openvpn/crypto.c M src/openvpn/init.c M src/openvpn/options.c M src/openvpn/pool.c 4 files changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/40/1140/4 diff --git a/src/openvpn/crypto.c b/src/openvpn/crypto.c index af7583a..a63e543 100644 --- a/src/openvpn/crypto.c +++ b/src/openvpn/crypto.c @@ -1901,7 +1901,7 @@ const char *seed =3D "tls1-prf-test"; const char *secret =3D "tls1-prf-test-secret"; uint8_t out[8]; - uint8_t expected_out[] =3D { 'q', 'D', '\xfe', '%', '@', 's', 'u', '\x= 95' }; + uint8_t expected_out[] =3D { 'q', 'D', 0xfe, '%', '@', 's', 'u', 0x95 = }; int ret =3D ssl_tls1_PRF((uint8_t *)seed, (int)strlen(seed), (uint8_t = *)secret, (int)strlen(secret), out, sizeof(out)); diff --git a/src/openvpn/init.c b/src/openvpn/init.c index 40ae2c8..5583274 100644 --- a/src/openvpn/init.c +++ b/src/openvpn/init.c @@ -343,7 +343,7 @@ const char *status =3D (ce->flags & CE_DISABLED) ? "disabled" : "e= nabled"; /* space for output including 3 commas and a nul */ - int len =3D + size_t len =3D strlen(ce->remote) + strlen(ce->remote_port) + strlen(proto) += strlen(status) + 3 + 1; char *out =3D malloc(len); check_malloc_return(out); diff --git a/src/openvpn/options.c b/src/openvpn/options.c index c54032d..5f9971c 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -4957,7 +4957,7 @@ #endif static inline bool -space(unsigned char c) +space(char c) { return c =3D=3D '\0' || isspace(c); } diff --git a/src/openvpn/pool.c b/src/openvpn/pool.c index 898a045..a41364a 100644 --- a/src/openvpn/pool.c +++ b/src/openvpn/pool.c @@ -158,7 +158,7 @@ switch (pool->ipv4.type) { case IFCONFIG_POOL_30NET: - pool->ipv4.base =3D start & ~3; + pool->ipv4.base =3D start & ~3u; pool_ipv4_size =3D (((end | 3) + 1) - pool->ipv4.base) >> = 2; break; -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1140?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: Id565ec17856444b580dd89edab92e9fe18d39b77 Gerrit-Change-Number: 1140 Gerrit-PatchSet: 4 Gerrit-Owner: flichtenheld Gerrit-Reviewer: cron2 Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-MessageType: newpatchset --47hvxVrQqkQ= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 uploaded patch set #4 to the change originally cr= eated by flichtenheld.

View Change

The following approvals got outd= ated and were removed: Code-Review+2 by cron2

Collect trivial conversion fixes

These are ve= ry local, simple fixes that do not
warrant their own commit.

Chan= ge-Id: Id565ec17856444b580dd89edab92e9fe18d39b77
Signed-off-by: Frank Li= chtenheld <frank@...2641...>
Acked-by: Gert Doering <gert@...1711...= 96...>
Message-Id: <20250817143922.17988-1-gert@...1296...>
= URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg32= 611.html
Signed-off-by: Gert Doering <gert@...1296...>
---
M= src/openvpn/crypto.c
M src/openvpn/init.c
M src/openvpn/options.cM src/openvpn/pool.c
4 files changed, 4 insertions(+), 4 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/40/11=
40/4
diff --git a/src/openvpn/crypto.c b/src/openvpn/crypto.c
index af7583a..a63e543 100644
--- a/src/openvpn/= crypto.c
+++ b/src/openvpn/crypto.c
@@ -190= 1,7 +1901,7 @@
const char *seed =3D "tls1-prf-tes= t";
const char *secret =3D "tls1-prf-test-se= cret";
uint8_t out[8];
- uint8_t expected_out[] =3D { 'q', &#= 39;D', '\xfe', '%', '@', 's', 'u= 9;, '\x95' };
+ uint8_t expected_out[] =3D { 'q', 'D', 0xfe, '%&#= 39;, '@', 's', 'u', 0x95 };

int ret =3D ssl_tls1_PRF((uint8_t *)seed, (int)strlen(seed)= , (uint8_t *)secret,
(int)strle= n(secret), out, sizeof(out));
diff --git a/src/openvpn/init= .c b/src/openvpn/init.c
index 40ae2c8..5583274 100644
--- a/src/openvpn/init.c
+++ b/src/openvpn/init.= c
@@ -343,7 +343,7 @@
const char *= status =3D (ce->flags & CE_DISABLED) ? "disabled" : "= enabled";

/* space for outp= ut including 3 commas and a nul */
- int len =3D
+ size_t len =3D
strlen(ce-= >remote) + strlen(ce->remote_port) + strlen(proto) + strlen(status) += 3 + 1;
char *out =3D malloc(len);
check_malloc_return(out);

diff --git a/src/openvp= n/options.c b/src/openvpn/options.c
index c54032d..5f9971c = 100644
--- a/src/openvpn/options.c
+++ b/sr= c/openvpn/options.c
@@ -4957,7 +4957,7 @@
= #endif

static inline bool
-space(unsigned char c)

+space(char c)

{<= /span>
return c =3D=3D '\0' || isspace(c);
= }
diff --git a/src/openvpn/pool.c b/src/openvpn/pool= .c
index 898a045..a41364a 100644
--- a/src/= openvpn/pool.c
+++ b/src/openvpn/pool.c
@@ = -158,7 +158,7 @@
switch (pool->ipv4.type)
{
case IFCONFIG_POOL_30NET= :
- pool= ->ipv4.base =3D start & ~3;
+ pool->ipv4.base =3D start & ~3u;
pool_ipv4_size =3D (((end | 3) + 1) - pool->= ;ipv4.base) >> 2;
break;
<= span>


To view, visit change 1140. To unsub= scribe, or for help writing mail filters, visit settings.

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Id565ec17856444b580dd89edab9= 2e9fe18d39b77
Gerrit-Change-Number: 1140
Gerrit-PatchSet: 4
Gerrit-Owner: flichtenheld <frank@...2723...= .>
Gerrit-Reviewer: cron2 <gert@...1296...>=
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-MessageType: newpatchset
--47hvxVrQqkQ=--