Skip to content

Commit acc8f82

Browse files
flichtenheldcron2
authored andcommitted
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 <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>
1 parent c4f4f26 commit acc8f82

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/openvpn/crypto.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1901,7 +1901,7 @@ check_tls_prf_working(void)
19011901
const char *seed = "tls1-prf-test";
19021902
const char *secret = "tls1-prf-test-secret";
19031903
uint8_t out[8];
1904-
uint8_t expected_out[] = { 'q', 'D', '\xfe', '%', '@', 's', 'u', '\x95' };
1904+
uint8_t expected_out[] = { 'q', 'D', 0xfe, '%', '@', 's', 'u', 0x95 };
19051905

19061906
int ret = ssl_tls1_PRF((uint8_t *)seed, (int)strlen(seed), (uint8_t *)secret,
19071907
(int)strlen(secret), out, sizeof(out));

src/openvpn/init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ management_callback_remote_entry_get(void *arg, unsigned int index, char **remot
343343
const char *status = (ce->flags & CE_DISABLED) ? "disabled" : "enabled";
344344

345345
/* space for output including 3 commas and a nul */
346-
int len =
346+
size_t len =
347347
strlen(ce->remote) + strlen(ce->remote_port) + strlen(proto) + strlen(status) + 3 + 1;
348348
char *out = malloc(len);
349349
check_malloc_return(out);

src/openvpn/options.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4957,7 +4957,7 @@ atou(const char *str)
49574957
#endif
49584958

49594959
static inline bool
4960-
space(unsigned char c)
4960+
space(char c)
49614961
{
49624962
return c == '\0' || isspace(c);
49634963
}

src/openvpn/pool.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ ifconfig_pool_init(const bool ipv4_pool, enum pool_type type, in_addr_t start, i
158158
switch (pool->ipv4.type)
159159
{
160160
case IFCONFIG_POOL_30NET:
161-
pool->ipv4.base = start & ~3;
161+
pool->ipv4.base = start & ~3u;
162162
pool_ipv4_size = (((end | 3) + 1) - pool->ipv4.base) >> 2;
163163
break;
164164

0 commit comments

Comments
 (0)