From: "flichtenheld (Code Review)" Date: Thu, 7 Aug 2025 17:02:46 +0000 References: Reply-To: frank@...2641..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net Message-ID: <10f02bae8b2e1e510a1f8244fac51334689989a4-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="CH5lon0Psr4="; 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: plaisthos Cc: openvpn-devel --CH5lon0Psr4= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: plaisthos. Hello plaisthos, I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/1140?usp=3Demail to review the following change. 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 --- 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/1 diff --git a/src/openvpn/crypto.c b/src/openvpn/crypto.c index e128bb8..f7a0206 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, strlen(seed), (uint8_t *)sec= ret, strlen(secret), out, sizeof(out)); diff --git a/src/openvpn/init.c b/src/openvpn/init.c index 2d6dacd..3cbdcf8 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 2fffa65..670718f 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -4960,7 +4960,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 abbad8f..cd1c768 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: 1 Gerrit-Owner: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos Gerrit-MessageType: newchange --CH5lon0Psr4= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is currently required from: plaisthos.

flichtenheld would like plaisthos to review this change.

V= iew Change

Collect trivial conversion fixes

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

Change-Id: I= d565ec17856444b580dd89edab92e9fe18d39b77
Signed-off-by: Frank Lichtenhel= d <frank@...2641...>
---
M src/openvpn/crypto.c
M src/openvp= n/init.c
M src/openvpn/options.c
M src/openvpn/pool.c
4 files chan= ged, 4 insertions(+), 4 deletions(-)

git pull ssh://gerrit.openvp=
n.net:29418/openvpn refs/changes/40/1140/1
diff --git a/src/openvpn=
/crypto.c b/src/openvpn/crypto.c
index e128bb8..f7a0206 100= 644
--- a/src/openvpn/crypto.c
+++ b/src/op= envpn/crypto.c
@@ -1901,7 +1901,7 @@
c= onst char *seed =3D "tls1-prf-test";
const c= har *secret =3D "tls1-prf-test-secret";
uint= 8_t out[8];
- uint8_= t expected_out[] =3D { 'q', 'D', '\xfe', '%'= ;, '@', 's', 'u', '\x95' };
+ uint8_t expected_out[] =3D { &#= 39;q', 'D', 0xfe, '%', '@', 's', 'u= ', 0x95 };

int ret =3D ssl_tls1_= PRF((uint8_t *)seed, strlen(seed), (uint8_t *)secret,
= strlen(secret), out, sizeof(out));
d= iff --git a/src/openvpn/init.c b/src/openvpn/init.c
index 2= d6dacd..3cbdcf8 100644
--- a/src/openvpn/init.c
<= span>+++ b/src/openvpn/init.c
@@ -343,7 +343,7 @@ const char *status =3D (ce->flags & CE_DISABLED) ? &= quot;disabled" : "enabled";

/* space for output including 3 commas and a nul */
- int len =3D
+ size_t len =3D
<= span> strlen(ce->remote) + strlen(ce->remote_port) + strl= en(proto) + strlen(status) + 3 + 1;
char *out =3D = malloc(len);
check_malloc_return(out);
<= span>diff --git a/src/openvpn/options.c b/src/openvpn/options.c
<= span>index 2fffa65..670718f 100644
--- a/src/openvpn/option= s.c
+++ b/src/openvpn/options.c
@@ -4960,7 = +4960,7 @@
#endif

stati= c inline bool
-space(un= signed char c)
+space= (char c)
{
return c =3D=3D '\0= 9; || isspace(c);
}
diff --git a/src/openv= pn/pool.c b/src/openvpn/pool.c
index abbad8f..cd1c768 10064= 4
--- a/src/openvpn/pool.c
+++ b/src/openvp= n/pool.c
@@ -158,7 +158,7 @@
switc= h (pool->ipv4.type)
{
= case IFCONFIG_POOL_30NET:
- pool->ipv4.base =3D start & ~3;
+ pool->ipv4.ba= se =3D start & ~3u;
pool_ipv4_size =3D= (((end | 3) + 1) - pool->ipv4.base) >> 2;
= break;


To v= iew, visit change 1140. To unsubscribe, 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: 1
Gerrit-Owner: flichtenheld <frank@...2723...= .>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-Attention: plaisthos <arne-openvpn@...220...= ..1227...>
Gerrit-MessageType: newchange
--CH5lon0Psr4=--