]> granicus.if.org Git - curl/commitdiff
ntlm: Remove unnecessary casts in readshort_le()
authorSteve Holme <steve_holme@hotmail.com>
Sun, 14 Dec 2014 11:45:14 +0000 (11:45 +0000)
committerSteve Holme <steve_holme@hotmail.com>
Sun, 14 Dec 2014 11:45:14 +0000 (11:45 +0000)
I don't think both of my fix ups from yesterday were needed to fix the
compilation warning, so remove the one that I think is unnecessary and
let the next Android autobuild prove/disprove it.

lib/curl_ntlm_msgs.c

index 0998cb44cc257f698e2781835dae7647901e64bb..d99a70f49b64d76e8f4e17101436a8e82118a182 100644 (file)
@@ -166,8 +166,8 @@ static unsigned int readint_le(unsigned char *buf)
  */
 static unsigned short readshort_le(unsigned char *buf)
 {
-  return (unsigned short)((unsigned short)((unsigned short)buf[0]) |
-                          (unsigned short)((unsigned short)buf[1] << 8));
+  return (unsigned short)(((unsigned short)buf[0]) |
+                          ((unsigned short)buf[1] << 8));
 }
 
 /*