diff options
author | Yang Tse <yangsita@gmail.com> | 2006-07-12 05:19:00 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2006-07-12 05:19:00 +0000 |
commit | 58176d14848f315ea74772bd9ce7edd847b2a17d (patch) | |
tree | 42685c540585d5c2d1205176734da6f2a54222e4 /lib/telnet.c | |
parent | 10489879f731465f3d2105870e7533c2b355af5d (diff) | |
download | curl-58176d14848f315ea74772bd9ce7edd847b2a17d.tar.gz |
Use platform's native types for recv() and send() arguments.
Diffstat (limited to 'lib/telnet.c')
-rw-r--r-- | lib/telnet.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/telnet.c b/lib/telnet.c index a609cd092..0b57f7706 100644 --- a/lib/telnet.c +++ b/lib/telnet.c @@ -289,12 +289,13 @@ static void printoption(struct SessionHandle *data, static void send_negotiation(struct connectdata *conn, int cmd, int option) { unsigned char buf[3]; + ssize_t bytes_written; buf[0] = CURL_IAC; buf[1] = cmd; buf[2] = option; - (void)swrite(conn->sock[FIRSTSOCKET], (char *)buf, 3); + bytes_written = swrite(conn->sock[FIRSTSOCKET], buf, 3); printoption(conn->data, "SENT", cmd, option); } @@ -843,6 +844,7 @@ static void suboption(struct connectdata *conn) { struct curl_slist *v; unsigned char temp[2048]; + ssize_t bytes_written; size_t len; size_t tmplen; char varname[128]; @@ -857,7 +859,7 @@ static void suboption(struct connectdata *conn) snprintf((char *)temp, sizeof(temp), "%c%c%c%c%s%c%c", CURL_IAC, CURL_SB, CURL_TELOPT_TTYPE, CURL_TELQUAL_IS, tn->subopt_ttype, CURL_IAC, CURL_SE); - (void)swrite(conn->sock[FIRSTSOCKET], (char *)temp, len); + bytes_written = swrite(conn->sock[FIRSTSOCKET], temp, len); printsub(data, '>', &temp[2], len-2); break; case CURL_TELOPT_XDISPLOC: @@ -865,7 +867,7 @@ static void suboption(struct connectdata *conn) snprintf((char *)temp, sizeof(temp), "%c%c%c%c%s%c%c", CURL_IAC, CURL_SB, CURL_TELOPT_XDISPLOC, CURL_TELQUAL_IS, tn->subopt_xdisploc, CURL_IAC, CURL_SE); - (void)swrite(conn->sock[FIRSTSOCKET], (char *)temp, len); + bytes_written = swrite(conn->sock[FIRSTSOCKET], temp, len); printsub(data, '>', &temp[2], len-2); break; case CURL_TELOPT_NEW_ENVIRON: @@ -888,7 +890,7 @@ static void suboption(struct connectdata *conn) snprintf((char *)&temp[len], sizeof(temp) - len, "%c%c", CURL_IAC, CURL_SE); len += 2; - (void)swrite(conn->sock[FIRSTSOCKET], (char *)temp, len); + bytes_written = swrite(conn->sock[FIRSTSOCKET], temp, len); printsub(data, '>', &temp[2], len-2); break; } |