From 26a7d938c9bf932a55cb5e4e02abb48fe395c5cd Mon Sep 17 00:00:00 2001 From: KaoruToda Date: Tue, 17 Oct 2017 23:04:09 +0900 Subject: Remove parentheses of return. Since return is inconsistent, I removed unnecessary parentheses and unified them. Reviewed-by: Rich Salz Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/4541) --- ssl/record/rec_layer_d1.c | 12 ++++++------ ssl/record/rec_layer_s3.c | 4 ++-- ssl/record/ssl3_record.c | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) (limited to 'ssl/record') diff --git a/ssl/record/rec_layer_d1.c b/ssl/record/rec_layer_d1.c index 483d2a8f7e..59285ed591 100644 --- a/ssl/record/rec_layer_d1.c +++ b/ssl/record/rec_layer_d1.c @@ -21,7 +21,7 @@ int DTLS_RECORD_LAYER_new(RECORD_LAYER *rl) DTLS_RECORD_LAYER *d; if ((d = OPENSSL_malloc(sizeof(*d))) == NULL) - return (0); + return 0; rl->d = d; @@ -36,7 +36,7 @@ int DTLS_RECORD_LAYER_new(RECORD_LAYER *rl) pqueue_free(d->buffered_app_data.q); OPENSSL_free(d); rl->d = NULL; - return (0); + return 0; } return 1; @@ -179,7 +179,7 @@ int dtls1_buffer_record(SSL *s, record_pqueue *queue, unsigned char *priority) OPENSSL_free(rdata->rbuf.buf); OPENSSL_free(rdata); pitem_free(item); - return (-1); + return -1; } /* insert should not fail, since duplicates are dropped */ @@ -188,7 +188,7 @@ int dtls1_buffer_record(SSL *s, record_pqueue *queue, unsigned char *priority) OPENSSL_free(rdata->rbuf.buf); OPENSSL_free(rdata); pitem_free(item); - return (-1); + return -1; } return 1; @@ -208,7 +208,7 @@ int dtls1_retrieve_buffered_record(SSL *s, record_pqueue *queue) return 1; } - return (0); + return 0; } /* @@ -339,7 +339,7 @@ int dtls1_read_bytes(SSL *s, int type, int *recvd_type, unsigned char *buf, if (!SSL3_BUFFER_is_initialised(&s->rlayer.rbuf)) { /* Not initialized yet */ if (!ssl3_setup_buffers(s)) - return (-1); + return -1; } if ((type && (type != SSL3_RT_APPLICATION_DATA) && diff --git a/ssl/record/rec_layer_s3.c b/ssl/record/rec_layer_s3.c index aec568707f..1225f9b4d8 100644 --- a/ssl/record/rec_layer_s3.c +++ b/ssl/record/rec_layer_s3.c @@ -657,7 +657,7 @@ int do_ssl3_write(SSL *s, int type, const unsigned char *buf, if (s->s3->alert_dispatch) { i = s->method->ssl_dispatch_alert(s); if (i <= 0) - return (i); + return i; /* if it went, fall through and send more stuff */ } @@ -1104,7 +1104,7 @@ int ssl3_write_pending(SSL *s, int type, const unsigned char *buf, size_t len, */ SSL3_BUFFER_set_left(&wb[currbuf], 0); } - return (i); + return i; } SSL3_BUFFER_add_offset(&wb[currbuf], tmpwrit); SSL3_BUFFER_sub_left(&wb[currbuf], tmpwrit); diff --git a/ssl/record/ssl3_record.c b/ssl/record/ssl3_record.c index 518e7a8c3b..8d71cd3184 100644 --- a/ssl/record/ssl3_record.c +++ b/ssl/record/ssl3_record.c @@ -758,7 +758,7 @@ int ssl3_do_compress(SSL *ssl, SSL3_RECORD *wr) (int)(wr->length + SSL3_RT_MAX_COMPRESSED_OVERHEAD), wr->input, (int)wr->length); if (i < 0) - return (0); + return 0; else wr->length = i; @@ -1714,7 +1714,7 @@ int dtls1_process_record(SSL *s, DTLS1_BITMAP *bitmap) f_err: ssl3_send_alert(s, SSL3_AL_FATAL, al); err: - return (0); + return 0; } /* -- cgit v1.2.3