summaryrefslogtreecommitdiffstats
path: root/lib/smb.c
diff options
context:
space:
mode:
authorCurl Upstream <curl-library@cool.haxx.se>2016-08-03 06:37:16 (GMT)
committerBrad King <brad.king@kitware.com>2016-08-03 18:26:29 (GMT)
commit202adcfe056681109fe61569ecdb3bd69f0b4f97 (patch)
treebabb186f9f5f5e1345c61a2b2a4b955a9bae7849 /lib/smb.c
parent7ec709d3d7cc988d4cf6dc2c49713d4c55f09542 (diff)
downloadCMake-202adcfe056681109fe61569ecdb3bd69f0b4f97.zip
CMake-202adcfe056681109fe61569ecdb3bd69f0b4f97.tar.gz
CMake-202adcfe056681109fe61569ecdb3bd69f0b4f97.tar.bz2
curl 2016-08-03 (f2cb3a01)
Code extracted from: https://github.com/bagder/curl.git at commit f2cb3a01192d36395d16acec6cdb93446ca6fd45 (curl-7_50_1).
Diffstat (limited to 'lib/smb.c')
-rw-r--r--lib/smb.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/smb.c b/lib/smb.c
index d461a71..56a38c2 100644
--- a/lib/smb.c
+++ b/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;