Fix some style issues from libssl size_tify review

Reviewed-by: Rich Salz <rsalz@openssl.org>
This commit is contained in:
Matt Caswell 2016-11-04 10:25:03 +00:00
parent ed9fa2c74b
commit ff04799d90
2 changed files with 7 additions and 11 deletions

View file

@ -164,9 +164,8 @@ __owur static ossl_inline int PACKET_get_net_2(PACKET *pkt, unsigned int *data)
__owur static ossl_inline int PACKET_get_net_2_len(PACKET *pkt, size_t *data)
{
unsigned int i;
int ret;
int ret = PACKET_get_net_2(pkt, &i);
ret = PACKET_get_net_2(pkt, &i);
if (ret)
*data = (size_t)i;
@ -206,9 +205,8 @@ __owur static ossl_inline int PACKET_get_net_3(PACKET *pkt, unsigned long *data)
__owur static ossl_inline int PACKET_get_net_3_len(PACKET *pkt, size_t *data)
{
unsigned long i;
int ret;
int ret = PACKET_get_net_3(pkt, &i);
ret = PACKET_get_net_3(pkt, &i);
if (ret)
*data = (size_t)i;
@ -249,9 +247,8 @@ __owur static ossl_inline int PACKET_get_net_4(PACKET *pkt, unsigned long *data)
__owur static ossl_inline int PACKET_get_net_4_len(PACKET *pkt, size_t *data)
{
unsigned long i;
int ret;
int ret = PACKET_get_net_4(pkt, &i);
ret = PACKET_get_net_4(pkt, &i);
if (ret)
*data = (size_t)i;
@ -285,9 +282,8 @@ __owur static ossl_inline int PACKET_get_1(PACKET *pkt, unsigned int *data)
__owur static ossl_inline int PACKET_get_1_len(PACKET *pkt, size_t *data)
{
unsigned int i;
int ret;
int ret = PACKET_get_1(pkt, &i);
ret = PACKET_get_1(pkt, &i);
if (ret)
*data = (size_t)i;

View file

@ -276,7 +276,7 @@ int ssl3_read_n(SSL *s, size_t n, size_t max, int extend, int clearold,
/* else we need to read more data */
if (n > (rb->len - rb->offset)) { /* does not happen */
if (n > rb->len - rb->offset) { /* does not happen */
SSLerr(SSL_F_SSL3_READ_N, ERR_R_INTERNAL_ERROR);
return -1;
}
@ -288,7 +288,7 @@ int ssl3_read_n(SSL *s, size_t n, size_t max, int extend, int clearold,
else {
if (max < n)
max = n;
if (max > (rb->len - rb->offset))
if (max > rb->len - rb->offset)
max = rb->len - rb->offset;
}
@ -610,7 +610,7 @@ int ssl3_write_bytes(SSL *s, int type, const void *buf_, size_t len,
return i;
}
if ((tmpwrit == n) ||
if (tmpwrit == n ||
(type == SSL3_RT_APPLICATION_DATA &&
(s->mode & SSL_MODE_ENABLE_PARTIAL_WRITE))) {
/*