summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-03-10 09:50:12 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-03-10 09:50:12 +0000
commitc39c55cb2dd02042365b0497aaa87fa654c2be07 (patch)
treeeae095c68200d337b13a2e0fa883b0d9be3fcf24 /lib
parentcf004cbc7efd983111d976693fe1f18361cfa8e6 (diff)
downloadcurl-c39c55cb2dd02042365b0497aaa87fa654c2be07.tar.gz
Minor edit to avoid an unreachable break and to remove the extra {} body
within the switch.
Diffstat (limited to 'lib')
-rw-r--r--lib/sendf.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/sendf.c b/lib/sendf.c
index f640e082f..79f8d51fb 100644
--- a/lib/sendf.c
+++ b/lib/sendf.c
@@ -236,6 +236,9 @@ CURLcode Curl_write(struct connectdata *conn,
'size_t' */
if (conn->ssl[num].use) {
int err;
+ char error_buffer[120]; /* OpenSSL documents that this must be at least
+ 120 bytes long. */
+ int sslerror;
int rc = SSL_write(conn->ssl[num].handle, mem, len);
if(rc < 0) {
@@ -254,19 +257,13 @@ CURLcode Curl_write(struct connectdata *conn,
Curl_ourerrno());
return CURLE_SEND_ERROR;
case SSL_ERROR_SSL:
- {
- /* A failure in the SSL library occurred, usually a
- protocol error. The OpenSSL error queue contains more
- information on the error. */
- char error_buffer[120]; /* OpenSSL documents that this must be at least
- 120 bytes long. */
- int sslerror = ERR_get_error();
+ /* A failure in the SSL library occurred, usually a protocol error.
+ The OpenSSL error queue contains more information on the error. */
+ sslerror = ERR_get_error();
failf(conn->data, "SSL_write() error: %s\n",
ERR_error_string(sslerror, error_buffer));
return CURLE_SEND_ERROR;
}
- break;
- }
/* a true error */
failf(conn->data, "SSL_write() return error %d\n", err);
return CURLE_SEND_ERROR;