sendf: move Curl_sendf to dict.c and make it static

... as the only remaining user of that function. Also fix gopher.c to
instead use Curl_write()

Closes #6020
This commit is contained in:
Daniel Stenberg 2020-09-28 14:14:25 +02:00
parent 422b257fef
commit a87cca7b1c
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
4 changed files with 71 additions and 76 deletions

View file

@ -171,9 +171,7 @@ static CURLcode gopher_do(struct connectdata *conn, bool *done)
free(sel_org);
if(!result)
/* We can use Curl_sendf to send the terminal \r\n relatively safely and
save allocing another string/doing another _write loop. */
result = Curl_sendf(sockfd, conn, "\r\n");
result = Curl_write(conn, sockfd, "\r\n", 2, &amount);
if(result) {
failf(data, "Failed sending Gopher request");
return result;