On 10-07-17 06:34, Antonio Quartulli wrote:
> 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>
> ---
>  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 76dda576..bb929283 100644
> --- a/src/openvpn/ntlm.c
> +++ b/src/openvpn/ntlm.c
> @@ -131,7 +131,7 @@ gen_nonce(unsigned char *nonce)
>  }
>  
>  void
> -my_strupr(unsigned char *str)
> +my_strupr(char *str)
>  {
>      /* converts string to uppercase in place */
>  
> @@ -273,7 +273,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);
> 

Evidently correct. ACK.

-Steffan

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to