summaryrefslogtreecommitdiffstats
path: root/ssl/ssl_lib.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2016-10-26 10:43:34 +0100
committerMatt Caswell <matt@openssl.org>2016-11-04 12:09:46 +0000
commit54105ddd230c0d77fab91dd3f423b58b2a976de7 (patch)
treed322b8427a0446f63eea2560ec4a4884666fac90 /ssl/ssl_lib.c
parent740bfebaf6d879f051da625d3c583f7cbba8944f (diff)
Rename all "read" variables with "readbytes"
Travis is reporting one file at a time shadowed variable warnings where "read" has been used. This attempts to go through all of libssl and replace "read" with "readbytes" to fix all the problems in one go. Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'ssl/ssl_lib.c')
-rw-r--r--ssl/ssl_lib.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c
index 4e2369d52f..363b4f4ab8 100644
--- a/ssl/ssl_lib.c
+++ b/ssl/ssl_lib.c
@@ -1533,26 +1533,26 @@ static int ssl_io_intern(void *vargs)
int SSL_read(SSL *s, void *buf, int num)
{
int ret;
- size_t read;
+ size_t readbytes;
if (num < 0) {
SSLerr(SSL_F_SSL_READ, SSL_R_BAD_LENGTH);
return -1;
}
- ret = SSL_read_ex(s, buf, (size_t)num, &read);
+ ret = SSL_read_ex(s, buf, (size_t)num, &readbytes);
/*
* The cast is safe here because ret should be <= INT_MAX because num is
* <= INT_MAX
*/
if (ret > 0)
- ret = (int)read;
+ ret = (int)readbytes;
return ret;
}
-int SSL_read_ex(SSL *s, void *buf, size_t num, size_t *read)
+int SSL_read_ex(SSL *s, void *buf, size_t num, size_t *readbytes)
{
if (s->handshake_func == NULL) {
SSLerr(SSL_F_SSL_READ_EX, SSL_R_UNINITIALIZED);
@@ -1575,36 +1575,36 @@ int SSL_read_ex(SSL *s, void *buf, size_t num, size_t *read)
args.f.func_read = s->method->ssl_read;
ret = ssl_start_async_job(s, &args, ssl_io_intern);
- *read = s->asyncrw;
+ *readbytes = s->asyncrw;
return ret;
} else {
- return s->method->ssl_read(s, buf, num, read);
+ return s->method->ssl_read(s, buf, num, readbytes);
}
}
int SSL_peek(SSL *s, void *buf, int num)
{
int ret;
- size_t read;
+ size_t readbytes;
if (num < 0) {
SSLerr(SSL_F_SSL_PEEK, SSL_R_BAD_LENGTH);
return -1;
}
- ret = SSL_peek_ex(s, buf, (size_t)num, &read);
+ ret = SSL_peek_ex(s, buf, (size_t)num, &readbytes);
/*
* The cast is safe here because ret should be <= INT_MAX because num is
* <= INT_MAX
*/
if (ret > 0)
- ret = (int)read;
+ ret = (int)readbytes;
return ret;
}
-int SSL_peek_ex(SSL *s, void *buf, size_t num, size_t *read)
+int SSL_peek_ex(SSL *s, void *buf, size_t num, size_t *readbytes)
{
if (s->handshake_func == NULL) {
SSLerr(SSL_F_SSL_PEEK_EX, SSL_R_UNINITIALIZED);
@@ -1625,10 +1625,10 @@ int SSL_peek_ex(SSL *s, void *buf, size_t num, size_t *read)
args.f.func_read = s->method->ssl_peek;
ret = ssl_start_async_job(s, &args, ssl_io_intern);
- *read = s->asyncrw;
+ *readbytes = s->asyncrw;
return ret;
} else {
- return s->method->ssl_peek(s, buf, num, read);
+ return s->method->ssl_peek(s, buf, num, readbytes);
}
}