Message ID | 20250817143922.17988-1-gert@greenie.muc.de |
---|---|
State | New |
Headers | show |
Series | [Openvpn-devel,v3] Collect trivial conversion fixes | expand |
The first three are really outright trivial. The fourth I felt a bit unsure about, so tested various combinations of --ifconfig-pool <start> and it's indeed correct. Your patch has been applied to the master branch. commit acc8f82fca61ea5478ab0bd16c16fff5c07ec9af Author: Frank Lichtenheld Date: Sun Aug 17 16:39:15 2025 +0200 Collect trivial conversion fixes Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com> Acked-by: Gert Doering <gert@greenie.muc.de> Message-Id: <20250817143922.17988-1-gert@greenie.muc.de> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg32611.html Signed-off-by: Gert Doering <gert@greenie.muc.de> -- kind regards, Gert Doering
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 = "tls1-prf-test"; const char *secret = "tls1-prf-test-secret"; uint8_t out[8]; - uint8_t expected_out[] = { 'q', 'D', '\xfe', '%', '@', 's', 'u', '\x95' }; + uint8_t expected_out[] = { 'q', 'D', 0xfe, '%', '@', 's', 'u', 0x95 }; int ret = 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 = (ce->flags & CE_DISABLED) ? "disabled" : "enabled"; /* space for output including 3 commas and a nul */ - int len = + size_t len = strlen(ce->remote) + strlen(ce->remote_port) + strlen(proto) + strlen(status) + 3 + 1; char *out = malloc(len); check_malloc_return(out); diff --git a/src/openvpn/options.c b/src/openvpn/options.c index d4dc0d3..d1c41d4 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 == '\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 = start & ~3; + pool->ipv4.base = start & ~3u; pool_ipv4_size = (((end | 3) + 1) - pool->ipv4.base) >> 2; break;