diff options
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; } |