return type cleanup

This commit is contained in:
Daniel Stenberg 2001-10-31 15:07:45 +00:00
parent 4118c68df1
commit eaf475b538

View File

@ -146,11 +146,12 @@ void Curl_failf(struct SessionHandle *data, const char *fmt, ...)
} }
/* Curl_sendf() sends formated data to the server */ /* Curl_sendf() sends formated data to the server */
size_t Curl_sendf(int sockfd, struct connectdata *conn, CURLcode Curl_sendf(int sockfd, struct connectdata *conn,
const char *fmt, ...) const char *fmt, ...)
{ {
struct SessionHandle *data = conn->data; struct SessionHandle *data = conn->data;
size_t bytes_written; size_t bytes_written;
CURLcode result;
char *s; char *s;
va_list ap; va_list ap;
va_start(ap, fmt); va_start(ap, fmt);
@ -162,11 +163,11 @@ size_t Curl_sendf(int sockfd, struct connectdata *conn,
fprintf(data->set.err, "> %s", s); fprintf(data->set.err, "> %s", s);
/* Write the buffer to the socket */ /* 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 */ free(s); /* free the output string */
return bytes_written; return result;
} }
/* /*
@ -211,7 +212,7 @@ CURLcode Curl_write(struct connectdata *conn, int sockfd,
#endif #endif
*written = bytes_written; *written = bytes_written;
return CURLE_OK; return (bytes_written==len)?CURLE_OK:CURLE_WRITE_ERROR;
} }
/* client_write() sends data to the write callback(s) /* client_write() sends data to the write callback(s)