Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Benjamin <davidben@chromium.org>2015-10-29 01:03:21 +0300
committerAdam Langley <agl@google.com>2015-11-04 01:50:59 +0300
commit3fc138eccda8838d04b3c71c62d4968f335cae91 (patch)
treefa12354e0e6c9aeedadf2efe2114595fca74efe8 /crypto/bio
parent165248c24ff2b02f3fb99ab5dd8487cda33c61a7 (diff)
Don't bother sampling __func__.
Removing the function codes continued to sample __func__ for compatibility with ERR_print_errors_cb, but not ERR_error_string_n. We can just emit OPENSSL_internal for both. ERR_print_errors_cb already has the file and line number available which is strictly more information than the function name. (ERR_error_string_n does not, but we'd already turned that to OPENSSL_internal.) This shaves 100kb from a release build of the bssl tool. In doing so, put an unused function code parameter back into ERR_put_error to align with OpenSSL. We don't need to pass an additional string in anymore, so OpenSSL compatibility with anything which uses ERR_LIB_USER or ERR_get_next_error_library costs nothing. (Not that we need it.) Change-Id: If6af34628319ade4145190b6f30a0d820e00b20d Reviewed-on: https://boringssl-review.googlesource.com/6387 Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'crypto/bio')
-rw-r--r--crypto/bio/connect.c6
-rw-r--r--crypto/bio/file.c6
-rw-r--r--crypto/bio/socket_helper.c2
3 files changed, 7 insertions, 7 deletions
diff --git a/crypto/bio/connect.c b/crypto/bio/connect.c
index 0b34d7f7..0b0bf131 100644
--- a/crypto/bio/connect.c
+++ b/crypto/bio/connect.c
@@ -222,7 +222,7 @@ static int conn_state(BIO *bio, BIO_CONNECT *c) {
ret = setsockopt(bio->num, SOL_SOCKET, SO_KEEPALIVE, (char *)&i,
sizeof(i));
if (ret < 0) {
- OPENSSL_PUT_SYSTEM_ERROR(setsockopt);
+ OPENSSL_PUT_SYSTEM_ERROR();
OPENSSL_PUT_ERROR(BIO, BIO_R_KEEPALIVE);
ERR_add_error_data(4, "host=", c->param_hostname, ":", c->param_port);
goto exit_loop;
@@ -236,7 +236,7 @@ static int conn_state(BIO *bio, BIO_CONNECT *c) {
c->state = BIO_CONN_S_BLOCKED_CONNECT;
bio->retry_reason = BIO_RR_CONNECT;
} else {
- OPENSSL_PUT_SYSTEM_ERROR(connect);
+ OPENSSL_PUT_SYSTEM_ERROR();
OPENSSL_PUT_ERROR(BIO, BIO_R_CONNECT_ERROR);
ERR_add_error_data(4, "host=", c->param_hostname, ":",
c->param_port);
@@ -257,7 +257,7 @@ static int conn_state(BIO *bio, BIO_CONNECT *c) {
ret = -1;
} else {
BIO_clear_retry_flags(bio);
- OPENSSL_PUT_SYSTEM_ERROR(connect);
+ OPENSSL_PUT_SYSTEM_ERROR();
OPENSSL_PUT_ERROR(BIO, BIO_R_NBIO_CONNECT_ERROR);
ERR_add_error_data(4, "host=", c->param_hostname, ":", c->param_port);
ret = 0;
diff --git a/crypto/bio/file.c b/crypto/bio/file.c
index 2d3ccfea..9e29b43c 100644
--- a/crypto/bio/file.c
+++ b/crypto/bio/file.c
@@ -129,7 +129,7 @@ BIO *BIO_new_file(const char *filename, const char *mode) {
file = open_file(filename, mode);
if (file == NULL) {
- OPENSSL_PUT_SYSTEM_ERROR(fopen);
+ OPENSSL_PUT_SYSTEM_ERROR();
ERR_add_error_data(5, "fopen('", filename, "','", mode, "')");
if (errno == ENOENT) {
@@ -188,7 +188,7 @@ static int file_read(BIO *b, char *out, int outl) {
size_t ret = fread(out, 1, outl, (FILE *)b->ptr);
if (ret == 0 && ferror((FILE *)b->ptr)) {
- OPENSSL_PUT_SYSTEM_ERROR(fread);
+ OPENSSL_PUT_SYSTEM_ERROR();
OPENSSL_PUT_ERROR(BIO, ERR_R_SYS_LIB);
return -1;
}
@@ -258,7 +258,7 @@ static long file_ctrl(BIO *b, int cmd, long num, void *ptr) {
}
fp = open_file(ptr, p);
if (fp == NULL) {
- OPENSSL_PUT_SYSTEM_ERROR(fopen);
+ OPENSSL_PUT_SYSTEM_ERROR();
ERR_add_error_data(5, "fopen('", ptr, "','", p, "')");
OPENSSL_PUT_ERROR(BIO, ERR_R_SYS_LIB);
ret = 0;
diff --git a/crypto/bio/socket_helper.c b/crypto/bio/socket_helper.c
index 96d7c247..4ddc094d 100644
--- a/crypto/bio/socket_helper.c
+++ b/crypto/bio/socket_helper.c
@@ -68,7 +68,7 @@ int bio_ip_and_port_to_socket_and_addr(int *out_sock,
*out_sock = socket(cur->ai_family, cur->ai_socktype, cur->ai_protocol);
if (*out_sock < 0) {
- OPENSSL_PUT_SYSTEM_ERROR(socket);
+ OPENSSL_PUT_SYSTEM_ERROR();
goto out;
}