aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2012-06-14 12:10:51 +0200
committerYang Tse <yangsita@gmail.com>2012-06-14 12:10:51 +0200
commit3af5023a20dc75ae00546359e44ba762d74887c1 (patch)
tree6d263b6a721540e628e1385c31aad0665fd7c49b
parent2bac074f08913746e6f0f2bb81fe24975cfd78ea (diff)
schannel: fix comparisons between signed and unsigned
-rw-r--r--lib/curl_schannel.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/curl_schannel.c b/lib/curl_schannel.c
index 19c28dfa6..1ddc220ae 100644
--- a/lib/curl_schannel.c
+++ b/lib/curl_schannel.c
@@ -220,7 +220,7 @@ schannel_connect_step1(struct connectdata *conn, int sockindex)
/* send initial handshake data which is now stored in output buffer */
written = swrite(conn->sock[sockindex], outbuf.pvBuffer, outbuf.cbBuffer);
s_pSecFn->FreeContextBuffer(outbuf.pvBuffer);
- if(written != outbuf.cbBuffer) {
+ if(outbuf.cbBuffer != (size_t)written) {
failf(data, "schannel: failed to send initial handshake data: %d\n",
written);
return CURLE_SSL_CONNECT_ERROR;
@@ -346,7 +346,7 @@ schannel_connect_step2(struct connectdata *conn, int sockindex)
/* send handshake token to server */
written = swrite(conn->sock[sockindex],
outbuf[i].pvBuffer, outbuf[i].cbBuffer);
- if(written != outbuf[i].cbBuffer) {
+ if(outbuf[i].cbBuffer != (size_t)written) {
failf(data, "schannel: failed to send next handshake data: %d\n",
written);
return CURLE_SSL_CONNECT_ERROR;