diff options
author | Daniel Stenberg <daniel@haxx.se> | 2001-10-31 15:07:45 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2001-10-31 15:07:45 +0000 |
commit | eaf475b538890336abb11fd9fd18a8ce166adaa9 (patch) | |
tree | 79afec59f5ab18e13828220a1b31a7ef8abb7277 /lib/sendf.c | |
parent | 4118c68df18b505483e073b56c8450ad1642f691 (diff) | |
download | curl-eaf475b538890336abb11fd9fd18a8ce166adaa9.tar.gz |
return type cleanup
Diffstat (limited to 'lib/sendf.c')
-rw-r--r-- | lib/sendf.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/sendf.c b/lib/sendf.c index f23d00406..99e3f65f8 100644 --- a/lib/sendf.c +++ b/lib/sendf.c @@ -146,11 +146,12 @@ void Curl_failf(struct SessionHandle *data, const char *fmt, ...) } /* Curl_sendf() sends formated data to the server */ -size_t Curl_sendf(int sockfd, struct connectdata *conn, - const char *fmt, ...) +CURLcode Curl_sendf(int sockfd, struct connectdata *conn, + const char *fmt, ...) { struct SessionHandle *data = conn->data; size_t bytes_written; + CURLcode result; char *s; va_list ap; va_start(ap, fmt); @@ -162,11 +163,11 @@ size_t Curl_sendf(int sockfd, struct connectdata *conn, fprintf(data->set.err, "> %s", s); /* Write the buffer to the socket */ - Curl_write(conn, sockfd, s, strlen(s), &bytes_written); + result = Curl_write(conn, sockfd, s, strlen(s), &bytes_written); free(s); /* free the output string */ - return bytes_written; + return result; } /* @@ -211,7 +212,7 @@ CURLcode Curl_write(struct connectdata *conn, int sockfd, #endif *written = bytes_written; - return CURLE_OK; + return (bytes_written==len)?CURLE_OK:CURLE_WRITE_ERROR; } /* client_write() sends data to the write callback(s) |