mirror of
https://github.com/OpenVPN/openvpn.git
synced 2026-06-09 00:42:51 -04:00
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 <a@unstable.cc> Acked-by: Steffan Karger <steffan.karger@fox-it.com> 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 <gert@greenie.muc.de>
This commit is contained in:
parent
e441d86188
commit
1cdfc9302a
1 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue