diff options
author | Brad King <brad.king@kitware.com> | 2016-08-03 18:26:53 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-08-03 18:26:53 (GMT) |
commit | f53f4a8a2d215dac634effea575a27e000dfcb29 (patch) | |
tree | 5782e71da9e12ab6081e47f8eaf8eeb908e1428a /Utilities/cmcurl/lib/smb.c | |
parent | e1c11352f231ae310339cd539ed59cb302bd4dbe (diff) | |
parent | 202adcfe056681109fe61569ecdb3bd69f0b4f97 (diff) | |
download | CMake-f53f4a8a2d215dac634effea575a27e000dfcb29.zip CMake-f53f4a8a2d215dac634effea575a27e000dfcb29.tar.gz CMake-f53f4a8a2d215dac634effea575a27e000dfcb29.tar.bz2 |
Merge branch 'upstream-curl' into update-curl
* upstream-curl:
curl 2016-08-03 (f2cb3a01)
Diffstat (limited to 'Utilities/cmcurl/lib/smb.c')
-rw-r--r-- | Utilities/cmcurl/lib/smb.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Utilities/cmcurl/lib/smb.c b/Utilities/cmcurl/lib/smb.c index d461a71..56a38c2 100644 --- a/Utilities/cmcurl/lib/smb.c +++ b/Utilities/cmcurl/lib/smb.c @@ -10,7 +10,7 @@ * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms - * are also available at http://curl.haxx.se/docs/copyright.html. + * are also available at https://curl.haxx.se/docs/copyright.html. * * You may opt to use, copy, modify, merge, publish, distribute and/or sell * copies of the Software, and permit persons to whom the Software is @@ -131,7 +131,7 @@ const struct Curl_handler Curl_handler_smbs = { defined(__OS400__) static unsigned short smb_swap16(unsigned short x) { - return (x << 8) | ((x >> 8) & 0xff); + return (unsigned short) ((x << 8) | ((x >> 8) & 0xff)); } static unsigned int smb_swap32(unsigned int x) @@ -143,12 +143,14 @@ static unsigned int smb_swap32(unsigned int x) #ifdef HAVE_LONGLONG static unsigned long long smb_swap64(unsigned long long x) { - return ((unsigned long long)smb_swap32(x) << 32) | smb_swap32(x >> 32); + return ((unsigned long long) smb_swap32((unsigned int) x) << 32) | + smb_swap32((unsigned int) (x >> 32)); } #else static unsigned __int64 smb_swap64(unsigned __int64 x) { - return ((unsigned __int64)smb_swap32(x) << 32) | smb_swap32(x >> 32); + return ((unsigned __int64) smb_swap32((unsigned int) x) << 32) | + smb_swap32((unsigned int) (x >> 32)); } #endif #else @@ -903,7 +905,6 @@ static CURLcode smb_disconnect(struct connectdata *conn, bool dead) /* smb_done is not always called, so cleanup the request */ if(req) { Curl_safefree(req->share); - Curl_safefree(conn->data->req.protop); } return CURLE_OK; @@ -928,7 +929,7 @@ static int smb_getsock(struct connectdata *conn, curl_socket_t *socks, static CURLcode smb_parse_url_path(struct connectdata *conn) { CURLcode result = CURLE_OK; - struct SessionHandle *data = conn->data; + struct Curl_easy *data = conn->data; struct smb_request *req = data->req.protop; char *path; char *slash; |