aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/socks.c6
-rw-r--r--lib/tftp.c5
-rw-r--r--lib/transfer.c4
-rw-r--r--src/main.c2
4 files changed, 9 insertions, 8 deletions
diff --git a/lib/socks.c b/lib/socks.c
index 693daffe3..c9cb85869 100644
--- a/lib/socks.c
+++ b/lib/socks.c
@@ -239,7 +239,7 @@ CURLcode Curl_SOCKS4(const char *proxy_name,
socksreq[6] = 0;
socksreq[7] = 1;
/* If still enough room in buffer, also append hostname */
- hostnamelen = strlen(hostname) + 1; /* length including NUL */
+ hostnamelen = (ssize_t)strlen(hostname) + 1; /* length including NUL */
if (packetsize + hostnamelen <= SOCKS4REQLEN)
strcpy((char*)socksreq + packetsize, hostname);
else
@@ -255,7 +255,7 @@ CURLcode Curl_SOCKS4(const char *proxy_name,
}
if (protocol4a && hostnamelen == 0) {
/* SOCKS4a with very long hostname - send that name separately */
- hostnamelen = strlen(hostname) + 1;
+ hostnamelen = (ssize_t)strlen(hostname) + 1;
code = Curl_write(conn, sock, (char *)hostname, hostnamelen, &written);
if((code != CURLE_OK) || (written != hostnamelen)) {
failf(data, "Failed to send SOCKS4 connect request.");
@@ -390,7 +390,7 @@ CURLcode Curl_SOCKS5(const char *proxy_name,
curl_socket_t sock = conn->sock[sockindex];
struct SessionHandle *data = conn->data;
long timeout;
- bool socks5_resolve_local = data->set.proxytype == CURLPROXY_SOCKS5;
+ bool socks5_resolve_local = (bool)(data->set.proxytype == CURLPROXY_SOCKS5);
const size_t hostname_len = strlen(hostname);
int packetsize = 0;
diff --git a/lib/tftp.c b/lib/tftp.c
index fcc193da3..69e3aba13 100644
--- a/lib/tftp.c
+++ b/lib/tftp.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -613,7 +613,8 @@ static CURLcode tftp_connect(struct connectdata *conn, bool *done)
sessionhandle, deal with it */
Curl_reset_reqproto(conn);
- if(!(state = conn->data->state.proto.tftp)) {
+ state = conn->data->state.proto.tftp;
+ if(!state) {
state = conn->data->state.proto.tftp = calloc(sizeof(tftp_state_data_t),
1);
if(!state)
diff --git a/lib/transfer.c b/lib/transfer.c
index 5b391318a..716094b2f 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -137,7 +137,7 @@ CURLcode Curl_fillreadbuffer(struct connectdata *conn, int bytes, int *nreadp)
else if(nread == CURL_READFUNC_PAUSE) {
struct SingleRequest *k = &data->req;
k->keepon |= KEEP_READ_PAUSE; /* mark reading as paused */
- return 0; /* nothing was read */
+ return CURLE_OK; /* nothing was read */
}
else if((size_t)nread > buffersize)
/* the read function returned a too large value */
diff --git a/src/main.c b/src/main.c
index 1f978f6d6..c86bf2fe7 100644
--- a/src/main.c
+++ b/src/main.c
@@ -2138,7 +2138,7 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */
}
else {
GetStr(&postdata, p);
- size = strlen(postdata);
+ size = (long)strlen(postdata);
}
if(!postdata) {