]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Collect trivial conversion fixes
authorFrank Lichtenheld <frank@lichtenheld.com>
Sun, 17 Aug 2025 14:39:15 +0000 (16:39 +0200)
committerGert Doering <gert@greenie.muc.de>
Sun, 17 Aug 2025 14:41:55 +0000 (16:41 +0200)
These are very local, simple fixes that do not
warrant their own commit.

Change-Id: Id565ec17856444b580dd89edab92e9fe18d39b77
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>
src/openvpn/crypto.c
src/openvpn/init.c
src/openvpn/options.c
src/openvpn/pool.c

index af7583aef97d97caa9257377244c42c38d576864..a63e543b041f9305128225cc1f996f4c68a11a5c 100644 (file)
@@ -1901,7 +1901,7 @@ check_tls_prf_working(void)
     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));
index 40ae2c8c077bec0cb8c3bc6e2eba9196dc1787db..55832745fec6136b2d568cea662c262f35c0f927 100644 (file)
@@ -343,7 +343,7 @@ management_callback_remote_entry_get(void *arg, unsigned int index, char **remot
         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);
index c54032d84c4854a60f804ff11f2fe0ad7923d97a..5f9971cd288bbbf9a9acdf937e1bb0222348ee44 100644 (file)
@@ -4957,7 +4957,7 @@ atou(const char *str)
 #endif
 
 static inline bool
-space(unsigned char c)
+space(char c)
 {
     return c == '\0' || isspace(c);
 }
index 898a045274a71bf0baacc32a79f0b47df1c6f3b7..a41364a544a9e7a36b1e909cf6f59dc533bf60c8 100644 (file)
@@ -158,7 +158,7 @@ ifconfig_pool_init(const bool ipv4_pool, enum pool_type type, in_addr_t start, i
         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;