From 1cdfc9302aad8570360d278aded5fb9f110ca2b6 Mon Sep 17 00:00:00 2001
From: Antonio Quartulli
Date: Mon, 10 Jul 2017 12:34:39 +0800
Subject: [PATCH] ntlm: avoid useless cast
The argument passed to my_strupr() is converted to an upper case
string by means of toupper(). The latter expects a single signed int
as argument, therefore it makes sense to have my_strupr() take a
signed argument too and avoid an explicit and an implicit cast.
Signed-off-by: Antonio Quartulli
Acked-by: Steffan Karger
Message-Id: <20170710043441.24770-3-a@unstable.cc>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg15031.html
Signed-off-by: Gert Doering
---
src/openvpn/ntlm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/openvpn/ntlm.c b/src/openvpn/ntlm.c
index 0b1163ee4..90d487547 100644
--- a/src/openvpn/ntlm.c
+++ b/src/openvpn/ntlm.c
@@ -130,7 +130,7 @@ gen_nonce(unsigned char *nonce)
}
void
-my_strupr(unsigned char *str)
+my_strupr(char *str)
{
/* converts string to uppercase in place */
@@ -271,7 +271,7 @@ ntlm_phase_3(const struct http_proxy_info *p, const char *phase_2, struct gc_are
int tib_len;
/* NTLMv2 hash */
- my_strupr((unsigned char *)strcpy(userdomain, username));
+ my_strupr(strcpy(userdomain, username));
if (strlen(username) + strlen(domain) < sizeof(userdomain))
{
strcat(userdomain, domain);
--
2.47.2