diff options
author | KaoruToda <kunnpuu@gmail.com> | 2017-10-17 23:04:09 +0900 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2017-10-18 16:05:06 +0100 |
commit | 26a7d938c9bf932a55cb5e4e02abb48fe395c5cd (patch) | |
tree | ce5b1908c181722514aa80d03026c6f42ab85972 /crypto/bio | |
parent | 2139145b72d084a3f974a94accd7d9812de286e4 (diff) |
Remove parentheses of return.
Since return is inconsistent, I removed unnecessary parentheses and
unified them.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4541)
Diffstat (limited to 'crypto/bio')
-rw-r--r-- | crypto/bio/b_print.c | 6 | ||||
-rw-r--r-- | crypto/bio/b_sock.c | 12 | ||||
-rw-r--r-- | crypto/bio/bf_buff.c | 60 | ||||
-rw-r--r-- | crypto/bio/bf_lbuf.c | 48 | ||||
-rw-r--r-- | crypto/bio/bf_nbio.c | 34 | ||||
-rw-r--r-- | crypto/bio/bf_null.c | 32 | ||||
-rw-r--r-- | crypto/bio/bio_lib.c | 42 | ||||
-rw-r--r-- | crypto/bio/bss_acpt.c | 28 | ||||
-rw-r--r-- | crypto/bio/bss_conn.c | 32 | ||||
-rw-r--r-- | crypto/bio/bss_dgram.c | 56 | ||||
-rw-r--r-- | crypto/bio/bss_fd.c | 24 | ||||
-rw-r--r-- | crypto/bio/bss_log.c | 12 | ||||
-rw-r--r-- | crypto/bio/bss_mem.c | 22 | ||||
-rw-r--r-- | crypto/bio/bss_null.c | 16 | ||||
-rw-r--r-- | crypto/bio/bss_sock.c | 22 |
15 files changed, 223 insertions, 223 deletions
diff --git a/crypto/bio/b_print.c b/crypto/bio/b_print.c index eeee52e8c1..056de86524 100644 --- a/crypto/bio/b_print.c +++ b/crypto/bio/b_print.c @@ -859,7 +859,7 @@ int BIO_printf(BIO *bio, const char *format, ...) ret = BIO_vprintf(bio, format, args); va_end(args); - return (ret); + return ret; } int BIO_vprintf(BIO *bio, const char *format, va_list args) @@ -886,7 +886,7 @@ int BIO_vprintf(BIO *bio, const char *format, va_list args) } else { ret = BIO_write(bio, hugebuf, (int)retlen); } - return (ret); + return ret; } /* @@ -905,7 +905,7 @@ int BIO_snprintf(char *buf, size_t n, const char *format, ...) ret = BIO_vsnprintf(buf, n, format, args); va_end(args); - return (ret); + return ret; } int BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args) diff --git a/crypto/bio/b_sock.c b/crypto/bio/b_sock.c index 270d1a5966..b3e89431bd 100644 --- a/crypto/bio/b_sock.c +++ b/crypto/bio/b_sock.c @@ -66,7 +66,7 @@ int BIO_get_port(const char *str, unsigned short *port_ptr) if (str == NULL) { BIOerr(BIO_F_BIO_GET_PORT, BIO_R_NO_PORT_DEFINED); - return (0); + return 0; } if (BIO_sock_init() != 1) @@ -102,9 +102,9 @@ int BIO_sock_error(int sock) */ i = getsockopt(sock, SOL_SOCKET, SO_ERROR, (void *)&j, &size); if (i < 0) - return (get_last_socket_error()); + return get_last_socket_error(); else - return (j); + return j; } # if OPENSSL_API_COMPAT < 0x10100000L @@ -142,7 +142,7 @@ int BIO_sock_init(void) err = WSAGetLastError(); SYSerr(SYS_F_WSASTARTUP, err); BIOerr(BIO_F_BIO_SOCK_INIT, BIO_R_WSASTARTUP); - return (-1); + return -1; } } # endif /* OPENSSL_SYS_WINDOWS */ @@ -150,7 +150,7 @@ int BIO_sock_init(void) extern int _watt_do_exit; _watt_do_exit = 0; /* don't make sock_init() call exit() */ if (sock_init()) - return (-1); + return -1; # endif return 1; @@ -201,7 +201,7 @@ int BIO_socket_ioctl(int fd, long type, void *arg) # endif /* __DJGPP__ */ if (i < 0) SYSerr(SYS_F_IOCTLSOCKET, get_last_socket_error()); - return (i); + return i; } # if OPENSSL_API_COMPAT < 0x10100000L diff --git a/crypto/bio/bf_buff.c b/crypto/bio/bf_buff.c index 0b3fe5f104..b90023ae2f 100644 --- a/crypto/bio/bf_buff.c +++ b/crypto/bio/bf_buff.c @@ -41,7 +41,7 @@ static const BIO_METHOD methods_buffer = { const BIO_METHOD *BIO_f_buffer(void) { - return (&methods_buffer); + return &methods_buffer; } static int buffer_new(BIO *bi) @@ -49,19 +49,19 @@ static int buffer_new(BIO *bi) BIO_F_BUFFER_CTX *ctx = OPENSSL_zalloc(sizeof(*ctx)); if (ctx == NULL) - return (0); + return 0; ctx->ibuf_size = DEFAULT_BUFFER_SIZE; ctx->ibuf = OPENSSL_malloc(DEFAULT_BUFFER_SIZE); if (ctx->ibuf == NULL) { OPENSSL_free(ctx); - return (0); + return 0; } ctx->obuf_size = DEFAULT_BUFFER_SIZE; ctx->obuf = OPENSSL_malloc(DEFAULT_BUFFER_SIZE); if (ctx->obuf == NULL) { OPENSSL_free(ctx->ibuf); OPENSSL_free(ctx); - return (0); + return 0; } bi->init = 1; @@ -75,7 +75,7 @@ static int buffer_free(BIO *a) BIO_F_BUFFER_CTX *b; if (a == NULL) - return (0); + return 0; b = (BIO_F_BUFFER_CTX *)a->ptr; OPENSSL_free(b->ibuf); OPENSSL_free(b->obuf); @@ -92,11 +92,11 @@ static int buffer_read(BIO *b, char *out, int outl) BIO_F_BUFFER_CTX *ctx; if (out == NULL) - return (0); + return 0; ctx = (BIO_F_BUFFER_CTX *)b->ptr; if ((ctx == NULL) || (b->next_bio == NULL)) - return (0); + return 0; num = 0; BIO_clear_retry_flags(b); @@ -111,7 +111,7 @@ static int buffer_read(BIO *b, char *out, int outl) ctx->ibuf_len -= i; num += i; if (outl == i) - return (num); + return num; outl -= i; out += i; } @@ -130,11 +130,11 @@ static int buffer_read(BIO *b, char *out, int outl) if (i < 0) return ((num > 0) ? num : i); if (i == 0) - return (num); + return num; } num += i; if (outl == i) - return (num); + return num; out += i; outl -= i; } @@ -148,7 +148,7 @@ static int buffer_read(BIO *b, char *out, int outl) if (i < 0) return ((num > 0) ? num : i); if (i == 0) - return (num); + return num; } ctx->ibuf_off = 0; ctx->ibuf_len = i; @@ -163,10 +163,10 @@ static int buffer_write(BIO *b, const char *in, int inl) BIO_F_BUFFER_CTX *ctx; if ((in == NULL) || (inl <= 0)) - return (0); + return 0; ctx = (BIO_F_BUFFER_CTX *)b->ptr; if ((ctx == NULL) || (b->next_bio == NULL)) - return (0); + return 0; BIO_clear_retry_flags(b); start: @@ -197,7 +197,7 @@ static int buffer_write(BIO *b, const char *in, int inl) if (i < 0) return ((num > 0) ? num : i); if (i == 0) - return (num); + return num; } ctx->obuf_off += i; ctx->obuf_len -= i; @@ -219,13 +219,13 @@ static int buffer_write(BIO *b, const char *in, int inl) if (i < 0) return ((num > 0) ? num : i); if (i == 0) - return (num); + return num; } num += i; in += i; inl -= i; if (inl == 0) - return (num); + return num; } /* @@ -252,7 +252,7 @@ static long buffer_ctrl(BIO *b, int cmd, long num, void *ptr) ctx->obuf_off = 0; ctx->obuf_len = 0; if (b->next_bio == NULL) - return (0); + return 0; ret = BIO_ctrl(b->next_bio, cmd, num, ptr); break; case BIO_CTRL_EOF: @@ -275,7 +275,7 @@ static long buffer_ctrl(BIO *b, int cmd, long num, void *ptr) ret = (long)ctx->obuf_len; if (ret == 0) { if (b->next_bio == NULL) - return (0); + return 0; ret = BIO_ctrl(b->next_bio, cmd, num, ptr); } break; @@ -283,7 +283,7 @@ static long buffer_ctrl(BIO *b, int cmd, long num, void *ptr) ret = (long)ctx->ibuf_len; if (ret == 0) { if (b->next_bio == NULL) - return (0); + return 0; ret = BIO_ctrl(b->next_bio, cmd, num, ptr); } break; @@ -347,7 +347,7 @@ static long buffer_ctrl(BIO *b, int cmd, long num, void *ptr) break; case BIO_C_DO_STATE_MACHINE: if (b->next_bio == NULL) - return (0); + return 0; BIO_clear_retry_flags(b); ret = BIO_ctrl(b->next_bio, cmd, num, ptr); BIO_copy_next_retry(b); @@ -355,7 +355,7 @@ static long buffer_ctrl(BIO *b, int cmd, long num, void *ptr) case BIO_CTRL_FLUSH: if (b->next_bio == NULL) - return (0); + return 0; if (ctx->obuf_len <= 0) { ret = BIO_ctrl(b->next_bio, cmd, num, ptr); break; @@ -368,7 +368,7 @@ static long buffer_ctrl(BIO *b, int cmd, long num, void *ptr) &(ctx->obuf[ctx->obuf_off]), ctx->obuf_len); BIO_copy_next_retry(b); if (r <= 0) - return ((long)r); + return (long)r; ctx->obuf_off += r; ctx->obuf_len -= r; } else { @@ -398,14 +398,14 @@ static long buffer_ctrl(BIO *b, int cmd, long num, void *ptr) break; default: if (b->next_bio == NULL) - return (0); + return 0; ret = BIO_ctrl(b->next_bio, cmd, num, ptr); break; } - return (ret); + return ret; malloc_error: BIOerr(BIO_F_BUFFER_CTRL, ERR_R_MALLOC_FAILURE); - return (0); + return 0; } static long buffer_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp) @@ -413,13 +413,13 @@ static long buffer_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp) long ret = 1; if (b->next_bio == NULL) - return (0); + return 0; switch (cmd) { default: ret = BIO_callback_ctrl(b->next_bio, cmd, fp); break; } - return (ret); + return ret; } static int buffer_gets(BIO *b, char *buf, int size) @@ -450,7 +450,7 @@ static int buffer_gets(BIO *b, char *buf, int size) ctx->ibuf_off += i; if (flag || size == 0) { *buf = '\0'; - return (num); + return num; } } else { /* read another chunk */ @@ -461,7 +461,7 @@ static int buffer_gets(BIO *b, char *buf, int size) if (i < 0) return ((num > 0) ? num : i); if (i == 0) - return (num); + return num; } ctx->ibuf_len = i; ctx->ibuf_off = 0; @@ -471,5 +471,5 @@ static int buffer_gets(BIO *b, char *buf, int size) static int buffer_puts(BIO *b, const char *str) { - return (buffer_write(b, str, strlen(str))); + return buffer_write(b, str, strlen(str)); } diff --git a/crypto/bio/bf_lbuf.c b/crypto/bio/bf_lbuf.c index 742271fdca..f3b91d9660 100644 --- a/crypto/bio/bf_lbuf.c +++ b/crypto/bio/bf_lbuf.c @@ -46,7 +46,7 @@ static const BIO_METHOD methods_linebuffer = { const BIO_METHOD *BIO_f_linebuffer(void) { - return (&methods_linebuffer); + return &methods_linebuffer; } typedef struct bio_linebuffer_ctx_struct { @@ -61,11 +61,11 @@ static int linebuffer_new(BIO *bi) ctx = OPENSSL_malloc(sizeof(*ctx)); if (ctx == NULL) - return (0); + return 0; ctx->obuf = OPENSSL_malloc(DEFAULT_LINEBUFFER_SIZE); if (ctx->obuf == NULL) { OPENSSL_free(ctx); - return (0); + return 0; } ctx->obuf_size = DEFAULT_LINEBUFFER_SIZE; ctx->obuf_len = 0; @@ -81,7 +81,7 @@ static int linebuffer_free(BIO *a) BIO_LINEBUFFER_CTX *b; if (a == NULL) - return (0); + return 0; b = (BIO_LINEBUFFER_CTX *)a->ptr; OPENSSL_free(b->obuf); OPENSSL_free(a->ptr); @@ -96,13 +96,13 @@ static int linebuffer_read(BIO *b, char *out, int outl) int ret = 0; if (out == NULL) - return (0); + return 0; if (b->next_bio == NULL) - return (0); + return 0; ret = BIO_read(b->next_bio, out, outl); BIO_clear_retry_flags(b); BIO_copy_next_retry(b); - return (ret); + return ret; } static int linebuffer_write(BIO *b, const char *in, int inl) @@ -111,10 +111,10 @@ static int linebuffer_write(BIO *b, const char *in, int inl) BIO_LINEBUFFER_CTX *ctx; if ((in == NULL) || (inl <= 0)) - return (0); + return 0; ctx = (BIO_LINEBUFFER_CTX *)b->ptr; if ((ctx == NULL) || (b->next_bio == NULL)) - return (0); + return 0; BIO_clear_retry_flags(b); @@ -160,7 +160,7 @@ static int linebuffer_write(BIO *b, const char *in, int inl) if (i < 0) return ((num > 0) ? num : i); if (i == 0) - return (num); + return num; } if (i < ctx->obuf_len) memmove(ctx->obuf, ctx->obuf + i, ctx->obuf_len - i); @@ -178,7 +178,7 @@ static int linebuffer_write(BIO *b, const char *in, int inl) if (i < 0) return ((num > 0) ? num : i); if (i == 0) - return (num); + return num; } num += i; in += i; @@ -214,7 +214,7 @@ static long linebuffer_ctrl(BIO *b, int cmd, long num, void *ptr) case BIO_CTRL_RESET: ctx->obuf_len = 0; if (b->next_bio == NULL) - return (0); + return 0; ret = BIO_ctrl(b->next_bio, cmd, num, ptr); break; case BIO_CTRL_INFO: @@ -224,7 +224,7 @@ static long linebuffer_ctrl(BIO *b, int cmd, long num, void *ptr) ret = (long)ctx->obuf_len; if (ret == 0) { if (b->next_bio == NULL) - return (0); + return 0; ret = BIO_ctrl(b->next_bio, cmd, num, ptr); } break; @@ -248,7 +248,7 @@ static long linebuffer_ctrl(BIO *b, int cmd, long num, void *ptr) break; case BIO_C_DO_STATE_MACHINE: if (b->next_bio == NULL) - return (0); + return 0; BIO_clear_retry_flags(b); ret = BIO_ctrl(b->next_bio, cmd, num, ptr); BIO_copy_next_retry(b); @@ -256,7 +256,7 @@ static long linebuffer_ctrl(BIO *b, int cmd, long num, void *ptr) case BIO_CTRL_FLUSH: if (b->next_bio == NULL) - return (0); + return 0; if (ctx->obuf_len <= 0) { ret = BIO_ctrl(b->next_bio, cmd, num, ptr); break; @@ -268,7 +268,7 @@ static long linebuffer_ctrl(BIO *b, int cmd, long num, void *ptr) r = BIO_write(b->next_bio, ctx->obuf, ctx->obuf_len); BIO_copy_next_retry(b); if (r <= 0) - return ((long)r); + return (long)r; if (r < ctx->obuf_len) memmove(ctx->obuf, ctx->obuf + r, ctx->obuf_len - r); ctx->obuf_len -= r; @@ -286,14 +286,14 @@ static long linebuffer_ctrl(BIO *b, int cmd, long num, void *ptr) break; default: if (b->next_bio == NULL) - return (0); + return 0; ret = BIO_ctrl(b->next_bio, cmd, num, ptr); break; } - return (ret); + return ret; malloc_error: BIOerr(BIO_F_LINEBUFFER_CTRL, ERR_R_MALLOC_FAILURE); - return (0); + return 0; } static long linebuffer_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp) @@ -301,23 +301,23 @@ static long linebuffer_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp) long ret = 1; if (b->next_bio == NULL) - return (0); + return 0; switch (cmd) { default: ret = BIO_callback_ctrl(b->next_bio, cmd, fp); break; } - return (ret); + return ret; } static int linebuffer_gets(BIO *b, char *buf, int size) { if (b->next_bio == NULL) - return (0); - return (BIO_gets(b->next_bio, buf, size)); + return 0; + return BIO_gets(b->next_bio, buf, size); } static int linebuffer_puts(BIO *b, const char *str) { - return (linebuffer_write(b, str, strlen(str))); + return linebuffer_write(b, str, strlen(str)); } diff --git a/crypto/bio/bf_nbio.c b/crypto/bio/bf_nbio.c index 455cdde1c5..1853cb1049 100644 --- a/crypto/bio/bf_nbio.c +++ b/crypto/bio/bf_nbio.c @@ -50,7 +50,7 @@ static const BIO_METHOD methods_nbiof = { const BIO_METHOD *BIO_f_nbio_test(void) { - return (&methods_nbiof); + return &methods_nbiof; } static int nbiof_new(BIO *bi) @@ -58,7 +58,7 @@ static int nbiof_new(BIO *bi) NBIO_TEST *nt; if ((nt = OPENSSL_zalloc(sizeof(*nt))) == NULL) - return (0); + return 0; nt->lrn = -1; nt->lwn = -1; bi->ptr = (char *)nt; @@ -69,7 +69,7 @@ static int nbiof_new(BIO *bi) static int nbiof_free(BIO *a) { if (a == NULL) - return (0); + return 0; OPENSSL_free(a->ptr); a->ptr = NULL; a->init = 0; @@ -84,9 +84,9 @@ static int nbiof_read(BIO *b, char *out, int outl) unsigned char n; if (out == NULL) - return (0); + return 0; if (b->next_bio == NULL) - return (0); + return 0; BIO_clear_retry_flags(b); if (RAND_bytes(&n, 1) <= 0) @@ -104,7 +104,7 @@ static int nbiof_read(BIO *b, char *out, int outl) if (ret < 0) BIO_copy_next_retry(b); } - return (ret); + return ret; } static int nbiof_write(BIO *b, const char *in, int inl) @@ -115,9 +115,9 @@ static int nbiof_write(BIO *b, const char *in, int inl) unsigned char n; if ((in == NULL) || (inl <= 0)) - return (0); + return 0; if (b->next_bio == NULL) - return (0); + return 0; nt = (NBIO_TEST *)b->ptr; BIO_clear_retry_flags(b); @@ -144,7 +144,7 @@ static int nbiof_write(BIO *b, const char *in, int inl) nt->lwn = inl; } } - return (ret); + return ret; } static long nbiof_ctrl(BIO *b, int cmd, long num, void *ptr) @@ -152,7 +152,7 @@ static long nbiof_ctrl(BIO *b, int cmd, long num, void *ptr) long ret; if (b->next_bio == NULL) - return (0); + return 0; switch (cmd) { case BIO_C_DO_STATE_MACHINE: BIO_clear_retry_flags(b); @@ -166,7 +166,7 @@ static long nbiof_ctrl(BIO *b, int cmd, long num, void *ptr) ret = BIO_ctrl(b->next_bio, cmd, num, ptr); break; } - return (ret); + return ret; } static long nbiof_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp) @@ -174,25 +174,25 @@ static long nbiof_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp) long ret = 1; if (b->next_bio == NULL) - return (0); + return 0; switch (cmd) { default: ret = BIO_callback_ctrl(b->next_bio, cmd, fp); break; } - return (ret); + return ret; } static int nbiof_gets(BIO *bp, char *buf, int size) { if (bp->next_bio == NULL) - return (0); - return (BIO_gets(bp->next_bio, buf, size)); + return 0; + return BIO_gets(bp->next_bio, buf, size); } static int nbiof_puts(BIO *bp, const char *str) { if (bp->next_bio == NULL) - return (0); - return (BIO_puts(bp->next_bio, str)); + return 0; + return BIO_puts(bp->next_bio, str); } diff --git a/crypto/bio/bf_null.c b/crypto/bio/bf_null.c index fb1e9c26ff..574fe22884 100644 --- a/crypto/bio/bf_null.c +++ b/crypto/bio/bf_null.c @@ -43,7 +43,7 @@ static const BIO_METHOD methods_nullf = { const BIO_METHOD *BIO_f_null(void) { - return (&methods_nullf); + return &methods_nullf; } static int nullf_new(BIO *bi) @@ -57,7 +57,7 @@ static int nullf_new(BIO *bi) static int nullf_free(BIO *a) { if (a == NULL) - return (0); + return 0; /*- a->ptr=NULL; a->init=0; @@ -71,13 +71,13 @@ static int nullf_read(BIO *b, char *out, int outl) int ret = 0; if (out == NULL) - return (0); + return 0; if (b->next_bio == NULL) - return (0); + return 0; ret = BIO_read(b->next_bio, out, outl); BIO_clear_retry_flags(b); BIO_copy_next_retry(b); - return (ret); + return ret; } static int nullf_write(BIO *b, const char *in, int inl) @@ -85,13 +85,13 @@ static int nullf_write(BIO *b, const char *in, int inl) int ret = 0; if ((in == NULL) || (inl <= 0)) - return (0); + return 0; if (b->next_bio == NULL) - return (0); + return 0; ret = BIO_write(b->next_bio, in, inl); BIO_clear_retry_flags(b); BIO_copy_next_retry(b); - return (ret); + return ret; } static long nullf_ctrl(BIO *b, int cmd, long num, void *ptr) @@ -99,7 +99,7 @@ static long nullf_ctrl(BIO *b, int cmd, long num, void *ptr) long ret; if (b->next_bio == NULL) - return (0); + return 0; switch (cmd) { case BIO_C_DO_STATE_MACHINE: BIO_clear_retry_flags(b); @@ -112,7 +112,7 @@ static long nullf_ctrl(BIO *b, int cmd, long num, void *ptr) default: ret = BIO_ctrl(b->next_bio, cmd, num, ptr); } - return (ret); + return ret; } static long nullf_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp) @@ -120,25 +120,25 @@ static long nullf_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp) long ret = 1; if (b->next_bio == NULL) - return (0); + return 0; switch (cmd) { default: ret = BIO_callback_ctrl(b->next_bio, cmd, fp); break; } - return (ret); + return ret; } static int nullf_gets(BIO *bp, char *buf, int size) { if (bp->next_bio == NULL) - return (0); - return (BIO_gets(bp->next_bio, buf, size)); + return 0; + return BIO_gets(bp->next_bio, buf, size); } static int nullf_puts(BIO *bp, const char *str) { if (bp->next_bio == NULL) - return (0); - return (BIO_puts(bp->next_bio, str)); + return 0; + return BIO_puts(bp->next_bio, str); } diff --git a/crypto/bio/bio_lib.c b/crypto/bio/bio_lib.c index 67acac3d28..3e90f8cfcb 100644 --- a/crypto/bio/bio_lib.c +++ b/crypto/bio/bio_lib.c @@ -75,7 +75,7 @@ BIO *BIO_new(const BIO_METHOD *method) if (bio == NULL) { BIOerr(BIO_F_BIO_NEW, ERR_R_MALLOC_FAILURE); - return (NULL); + return NULL; } bio->method = method; @@ -435,7 +435,7 @@ int BIO_gets(BIO *b, char *buf, int size) if ((b == NULL) || (b->method == NULL) || (b->method->bgets == NULL)) { BIOerr(BIO_F_BIO_GETS, BIO_R_UNSUPPORTED_METHOD); - return (-2); + return -2; } if (size < 0) { @@ -451,7 +451,7 @@ int BIO_gets(BIO *b, char *buf, int size) if (!b->init) { BIOerr(BIO_F_BIO_GETS, BIO_R_UNINITIALIZED); - return (-2); + return -2; } ret = b->method->bgets(b, buf, size); @@ -493,7 +493,7 @@ long BIO_int_ctrl(BIO *b, int cmd, long larg, int iarg) int i; i = iarg; - return (BIO_ctrl(b, cmd, larg, (char *)&i)); + return BIO_ctrl(b, cmd, larg, (char *)&i); } void *BIO_ptr_ctrl(BIO *b, int cmd, long larg) @@ -501,9 +501,9 @@ void *BIO_ptr_ctrl(BIO *b, int cmd, long larg) void *p = NULL; if (BIO_ctrl(b, cmd, larg, (char *)&p) <= 0) - return (NULL); + return NULL; else - return (p); + return p; } long BIO_ctrl(BIO *b, int cmd, long larg, void *parg) @@ -540,11 +540,11 @@ long BIO_callback_ctrl(BIO *b, int cmd, long ret; if (b == NULL) - return (0); + return 0; if ((b->method == NULL) || (b->method->callback_ctrl == NULL)) { BIOerr(BIO_F_BIO_CALLBACK_CTRL, BIO_R_UNSUPPORTED_METHOD); - return (-2); + return -2; } if (b->callback != NULL || b->callback_ex != NULL) { @@ -584,7 +584,7 @@ BIO *BIO_push(BIO *b, BIO *bio) BIO *lb; if (b == NULL) - return (bio); + return bio; lb = b; while (lb->next_bio != NULL) lb = lb->next_bio; @@ -593,7 +593,7 @@ BIO *BIO_push(BIO *b, BIO *bio) bio->prev_bio = lb; /* called to do internal processing */ BIO_ctrl(b, BIO_CTRL_PUSH, 0, lb); - return (b); + return b; } /* Remove the first and return the rest */ @@ -602,7 +602,7 @@ BIO *BIO_pop(BIO *b) BIO *ret; if (b == NULL) - return (NULL); + return NULL; ret = b->next_bio; BIO_ctrl(b, BIO_CTRL_POP, 0, b); @@ -614,7 +614,7 @@ BIO *BIO_pop(BIO *b) b->next_bio = NULL; b->prev_bio = NULL; - return (ret); + return ret; } BIO *BIO_get_retry_BIO(BIO *bio, int *reason) @@ -632,12 +632,12 @@ BIO *BIO_get_retry_BIO(BIO *bio, int *reason) } if (reason != NULL) *reason = last->retry_reason; - return (last); + return last; } int BIO_get_retry_reason(BIO *bio) { - return (bio->retry_reason); + return bio->retry_reason; } void BIO_set_retry_reason(BIO *bio, int reason) @@ -658,13 +658,13 @@ BIO *BIO_find_type(BIO *bio, int type) if (!mask) { if (mt & type) - return (bio); + return bio; } else if (mt == type) - return (bio); + return bio; } bio = bio->next_bio; } while (bio != NULL); - return (NULL); + return NULL; } BIO *BIO_next(BIO *b) @@ -732,11 +732,11 @@ BIO *BIO_dup_chain(BIO *in) eoc = new_bio; } } - return (ret); + return ret; err: BIO_free_all(ret); - return (NULL); + return NULL; } void BIO_copy_next_retry(BIO *b) @@ -747,12 +747,12 @@ void BIO_copy_next_retry(BIO *b) int BIO_set_ex_data(BIO *bio, int idx, void *data) { - return (CRYPTO_set_ex_data(&(bio->ex_data), idx, data)); + return CRYPTO_set_ex_data(&(bio->ex_data), idx, data); } void *BIO_get_ex_data(BIO *bio, int idx) { - return (CRYPTO_get_ex_data(&(bio->ex_data), idx)); + return CRYPTO_get_ex_data(&(bio->ex_data), idx); } uint64_t BIO_number_read(BIO *bio) diff --git a/crypto/bio/bss_acpt.c b/crypto/bio/bss_acpt.c index ecb115762e..f795b89145 100644 --- a/crypto/bio/bss_acpt.c +++ b/crypto/bio/bss_acpt.c @@ -70,7 +70,7 @@ static const BIO_METHOD methods_acceptp = { const BIO_METHOD *BIO_s_accept(void) { - return (&methods_acceptp); + return &methods_acceptp; } static int acpt_new(BIO *bi) @@ -81,7 +81,7 @@ static int acpt_new(BIO *bi) bi->num = (int)INVALID_SOCKET; bi->flags = 0; if ((ba = BIO_ACCEPT_new()) == NULL) - return (0); + return 0; bi->ptr = (char *)ba; ba->state = ACPT_S_BEFORE; bi->shutdown = 1; @@ -93,10 +93,10 @@ static BIO_ACCEPT *BIO_ACCEPT_new(void) BIO_ACCEPT *ret; if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL) - return (NULL); + return NULL; ret->accept_family = BIO_FAMILY_IPANY; ret->accept_sock = (int)INVALID_SOCKET; - return (ret); + return ret; } static void BIO_ACCEPT_free(BIO_ACCEPT *a) @@ -133,7 +133,7 @@ static int acpt_free(BIO *a) BIO_ACCEPT *data; if (a == NULL) - return (0); + return 0; data = (BIO_ACCEPT *)a->ptr; if (a->shutdown) { @@ -359,12 +359,12 @@ static int acpt_read(BIO *b, char *out, int outl) while (b->next_bio == NULL) { ret = acpt_state(b, data); if (ret <= 0) - return (ret); + return ret; } ret = BIO_read(b->next_bio, out, outl); BIO_copy_next_retry(b); - return (ret); + return ret; } static int acpt_write(BIO *b, const char *in, int inl) @@ -378,12 +378,12 @@ static int acpt_write(BIO *b, const char *in, int inl) while (b->next_bio == NULL) { ret = acpt_state(b, data); if (ret <= 0) - return (ret); + return ret; } ret = BIO_write(b->next_bio, in, inl); BIO_copy_next_retry(b); - return (ret); + return ret; } static long acpt_ctrl(BIO *b, int cmd, long num, void *ptr) @@ -527,7 +527,7 @@ static long acpt_ctrl(BIO *b, int cmd, long num, void *ptr) ret = 0; break; } - return (ret); + return ret; } static int acpt_puts(BIO *bp, const char *str) @@ -536,7 +536,7 @@ static int acpt_puts(BIO *bp, const char *str) n = strlen(str); ret = acpt_write(bp, str, n); - return (ret); + return ret; } BIO *BIO_new_accept(const char *str) @@ -545,11 +545,11 @@ BIO *BIO_new_accept(const char *str) ret = BIO_new(BIO_s_accept()); if (ret == NULL) - return (NULL); + return NULL; if (BIO_set_accept_name(ret, str)) - return (ret); + return ret; BIO_free(ret); - return (NULL); + return NULL; } #endif diff --git a/crypto/bio/bss_conn.c b/crypto/bio/bss_conn.c index 7c6c9a45df..0ead113cad 100644 --- a/crypto/bio/bss_conn.c +++ b/crypto/bio/bss_conn.c @@ -216,7 +216,7 @@ static int conn_state(BIO *b, BIO_CONNECT *c) if (cb != NULL) ret = cb((BIO *)b, c->state, ret); end: - return (ret); + return ret; } BIO_CONNECT *BIO_CONNECT_new(void) @@ -224,10 +224,10 @@ BIO_CONNECT *BIO_CONNECT_new(void) BIO_CONNECT *ret; if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL) - return (NULL); + return NULL; ret->state = BIO_CONN_S_BEFORE; ret->connect_family = BIO_FAMILY_IPANY; - return (ret); + return ret; } void BIO_CONNECT_free(BIO_CONNECT *a) @@ -243,7 +243,7 @@ void BIO_CONNECT_free(BIO_CONNECT *a) const BIO_METHOD *BIO_s_connect(void) { - return (&methods_connectp); + return &methods_connectp; } static int conn_new(BIO *bi) @@ -252,7 +252,7 @@ static int conn_new(BIO *bi) bi->num = (int)INVALID_SOCKET; bi->flags = 0; if ((bi->ptr = (char *)BIO_CONNECT_new()) == NULL) - return (0); + return 0; else return 1; } @@ -276,7 +276,7 @@ static int conn_free(BIO *a) BIO_CONNECT *data; if (a == NULL) - return (0); + return 0; data = (BIO_CONNECT *)a->ptr; if (a->shutdown) { @@ -298,7 +298,7 @@ static int conn_read(BIO *b, char *out, int outl) if (data->state != BIO_CONN_S_OK) { ret = conn_state(b, data); if (ret <= 0) - return (ret); + return ret; } if (out != NULL) { @@ -310,7 +310,7 @@ static int conn_read(BIO *b, char *out, int outl) BIO_set_retry_read(b); } } - return (ret); + return ret; } static int conn_write(BIO *b, const char *in, int inl) @@ -322,7 +322,7 @@ static int conn_write(BIO *b, const char *in, int inl) if (data->state != BIO_CONN_S_OK) { ret = conn_state(b, data); if (ret <= 0) - return (ret); + return ret; } clear_socket_error(); @@ -332,7 +332,7 @@ static int conn_write(BIO *b, const char *in, int inl) if (BIO_sock_should_retry(ret)) BIO_set_retry_write(b); } - return (ret); + return ret; } static long conn_ctrl(BIO *b, int cmd, long num, void *ptr) @@ -492,7 +492,7 @@ static long conn_ctrl(BIO *b, int cmd, long num, void *ptr) ret = 0; break; } - return (ret); + return ret; } static long conn_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp) @@ -513,7 +513,7 @@ static long conn_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp) ret = 0; break; } - return (ret); + return ret; } static int conn_puts(BIO *bp, const char *str) @@ -522,7 +522,7 @@ static int conn_puts(BIO *bp, const char *str) n = strlen(str); ret = conn_write(bp, str, n); - return (ret); + return ret; } BIO *BIO_new_connect(const char *str) @@ -531,11 +531,11 @@ BIO *BIO_new_connect(const char *str) ret = BIO_new(BIO_s_connect()); if (ret == NULL) - return (NULL); + return NULL; if (BIO_set_conn_hostname(ret, str)) - return (ret); + return ret; BIO_free(ret); - return (NULL); + return NULL; } #endif diff --git a/crypto/bio/bss_dgram.c b/crypto/bio/bss_dgram.c index 28fc7a50d5..df2203e013 100644 --- a/crypto/bio/bss_dgram.c +++ b/crypto/bio/bss_dgram.c @@ -136,7 +136,7 @@ typedef struct bio_dgram_sctp_data_st { const BIO_METHOD *BIO_s_datagram(void) { - return (&methods_dgramp); + return &methods_dgramp; } BIO *BIO_new_dgram(int fd, int close_flag) @@ -145,9 +145,9 @@ BIO *BIO_new_dgram(int fd, int close_flag) ret = BIO_new(BIO_s_datagram()); if (ret == NULL) - return (NULL); + return NULL; BIO_set_fd(ret, fd, close_flag); - return (ret); + return ret; } static int dgram_new(BIO *bi) @@ -165,7 +165,7 @@ static int dgram_free(BIO *a) bio_dgram_data *data; if (a == NULL) - return (0); + return 0; if (!dgram_clear(a)) return 0; @@ -178,7 +178,7 @@ static int dgram_free(BIO *a) static int dgram_clear(BIO *a) { if (a == NULL) - return (0); + return 0; if (a->shutdown) { if (a->init) { BIO_closesocket(a->num); @@ -325,7 +325,7 @@ static int dgram_read(BIO *b, char *out, int outl) dgram_reset_rcv_timeout(b); } - return (ret); + return ret; } static int dgram_write(BIO *b, const char *in, int inl) @@ -355,7 +355,7 @@ static int dgram_write(BIO *b, const char *in, int inl) data->_errno = get_last_socket_error(); } } - return (ret); + return ret; } static long dgram_get_mtu_overhead(bio_dgram_data *data) @@ -799,7 +799,7 @@ static long dgram_ctrl(BIO *b, int cmd, long num, void *ptr) ret = 0; break; } - return (ret); + return ret; } static int dgram_puts(BIO *bp, const char *str) @@ -808,13 +808,13 @@ static int dgram_puts(BIO *bp, const char *str) n = strlen(str); ret = dgram_write(bp, str, n); - return (ret); + return ret; } # ifndef OPENSSL_NO_SCTP const BIO_METHOD *BIO_s_datagram_sctp(void) { - return (&methods_dgramp_sctp); + return &methods_dgramp_sctp; } BIO *BIO_new_dgram_sctp(int fd, int close_flag) @@ -836,7 +836,7 @@ BIO *BIO_new_dgram_sctp(int fd, int close_flag) bio = BIO_new(BIO_s_datagram_sctp()); if (bio == NULL) - return (NULL); + return NULL; BIO_set_fd(bio, fd, close_flag); /* Activate SCTP-AUTH for DATA and FORWARD-TSN chunks */ @@ -848,7 +848,7 @@ BIO *BIO_new_dgram_sctp(int fd, int close_flag) BIO_vfree(bio); BIOerr(BIO_F_BIO_NEW_DGRAM_SCTP, ERR_R_SYS_LIB); ERR_add_error_data(1, "Ensure SCTP AUTH chunks are enabled in kernel"); - return (NULL); + return NULL; } auth.sauth_chunk = OPENSSL_SCTP_FORWARD_CUM_TSN_CHUNK_TYPE; ret = @@ -858,7 +858,7 @@ BIO *BIO_new_dgram_sctp(int fd, int close_flag) BIO_vfree(bio); BIOerr(BIO_F_BIO_NEW_DGRAM_SCTP, ERR_R_SYS_LIB); ERR_add_error_data(1, "Ensure SCTP AUTH chunks are enabled in kernel"); - return (NULL); + return NULL; } /* @@ -871,14 +871,14 @@ BIO *BIO_new_dgram_sctp(int fd, int close_flag) authchunks = OPENSSL_zalloc(sockopt_len); if (authchunks == NULL) { BIO_vfree(bio); - return (NULL); + return NULL; } ret = getsockopt(fd, IPPROTO_SCTP, SCTP_LOCAL_AUTH_CHUNKS, authchunks, &sockopt_len); if (ret < 0) { OPENSSL_free(authchunks); BIO_vfree(bio); - return (NULL); + return NULL; } for (p = (unsigned char *)authchunks->gauth_chunks; @@ -912,14 +912,14 @@ BIO *BIO_new_dgram_sctp(int fd, int close_flag) sizeof(struct sctp_event)); if (ret < 0) { BIO_vfree(bio); - return (NULL); + return NULL; } # else sockopt_len = (socklen_t) sizeof(struct sctp_event_subscribe); ret = getsockopt(fd, IPPROTO_SCTP, SCTP_EVENTS, &event, &sockopt_len); if (ret < 0) { BIO_vfree(bio); - return (NULL); + return NULL; } event.sctp_authentication_event = 1; @@ -929,7 +929,7 @@ BIO *BIO_new_dgram_sctp(int fd, int close_flag) sizeof(struct sctp_event_subscribe)); if (ret < 0) { BIO_vfree(bio); - return (NULL); + return NULL; } # endif # endif @@ -943,10 +943,10 @@ BIO *BIO_new_dgram_sctp(int fd, int close_flag) sizeof(optval)); if (ret < 0) { BIO_vfree(bio); - return (NULL); + return NULL; } - return (bio); + return bio; } int BIO_dgram_is_sctp(BIO *bio) @@ -977,7 +977,7 @@ static int dgram_sctp_free(BIO *a) bio_dgram_sctp_data *data; if (a == NULL) - return (0); + return 0; if (!dgram_clear(a)) return 0; @@ -1222,7 +1222,7 @@ static int dgram_sctp_read(BIO *b, char *out, int outl) data->peer_auth_tested = 1; } } - return (ret); + return ret; } /* @@ -1338,7 +1338,7 @@ static int dgram_sctp_write(BIO *b, const char *in, int inl) data->_errno = get_last_socket_error(); } } - return (ret); + return ret; } static long dgram_sctp_ctrl(BIO *b, int cmd, long num, void *ptr) @@ -1573,7 +1573,7 @@ static long dgram_sctp_ctrl(BIO *b, int cmd, long num, void *ptr) ret = dgram_ctrl(b, cmd, num, ptr); break; } - return (ret); + return ret; } int BIO_dgram_sctp_notification_cb(BIO *b, @@ -1830,7 +1830,7 @@ static int dgram_sctp_puts(BIO *bp, const char *str) n = strlen(str); ret = dgram_sctp_write(bp, str, n); - return (ret); + return ret; } # endif @@ -1849,9 +1849,9 @@ static int BIO_dgram_should_retry(int i) */ # endif - return (BIO_dgram_non_fatal_error(err)); + return BIO_dgram_non_fatal_error(err); } - return (0); + return 0; } int BIO_dgram_non_fatal_error(int err) @@ -1899,7 +1899,7 @@ int BIO_dgram_non_fatal_error(int err) default: break; } - return (0); + return 0; } static void get_current_time(struct timeval *t) diff --git a/crypto/bio/bss_fd.c b/crypto/bio/bss_fd.c index 9fcaaa60d9..9c1826c06c 100644 --- a/crypto/bio/bss_fd.c +++ b/crypto/bio/bss_fd.c @@ -75,7 +75,7 @@ static const BIO_METHOD methods_fdp = { const BIO_METHOD *BIO_s_fd(void) { - return (&methods_fdp); + return &methods_fdp; } BIO *BIO_new_fd(int fd, int close_flag) @@ -83,9 +83,9 @@ BIO *BIO_new_fd(int fd, int close_flag) BIO *ret; ret = BIO_new(BIO_s_fd()); if (ret == NULL) - return (NULL); + return NULL; BIO_set_fd(ret, fd, close_flag); - return (ret); + return ret; } static int fd_new(BIO *bi) @@ -100,7 +100,7 @@ static int fd_new(BIO *bi) static int fd_free(BIO *a) { if (a == NULL) - return (0); + return 0; if (a->shutdown) { if (a->init) { UP_close(a->num); @@ -124,7 +124,7 @@ static int fd_read(BIO *b, char *out, int outl) BIO_set_retry_read(b); } } - return (ret); + return ret; } static int fd_write(BIO *b, const char *in, int inl) @@ -137,7 +137,7 @@ static int fd_write(BIO *b, const char *in, int inl) if (BIO_fd_should_retry(ret)) BIO_set_retry_write(b); } - return (ret); + return ret; } static long fd_ctrl(BIO *b, int cmd, long num, void *ptr) @@ -189,7 +189,7 @@ static long fd_ctrl(BIO *b, int cmd, long num, void *ptr) ret = 0; break; } - return (ret); + return ret; } static int fd_puts(BIO *bp, const char *str) @@ -198,7 +198,7 @@ static int fd_puts(BIO *bp, const char *str) n = strlen(str); ret = fd_write(bp, str, n); - return (ret); + return ret; } static int fd_gets(BIO *bp, char *buf, int size) @@ -216,7 +216,7 @@ static int fd_gets(BIO *bp, char *buf, int size) if (buf[0] != '\0') ret = strlen(buf); - return (ret); + return ret; } int BIO_fd_should_retry(int i) @@ -226,9 +226,9 @@ int BIO_fd_should_retry(int i) if ((i == 0) || (i == -1)) { err = get_last_sys_error(); - return (BIO_fd_non_fatal_error(err)); + return BIO_fd_non_fatal_error(err); } - return (0); + return 0; } int BIO_fd_non_fatal_error(int err) @@ -274,6 +274,6 @@ int BIO_fd_non_fatal_error(int err) default: break; } - return (0); + return 0; } #endif diff --git a/crypto/bio/bss_log.c b/crypto/bio/bss_log.c index 181ab9c58f..b5b9363c38 100644 --- a/crypto/bio/bss_log.c +++ b/crypto/bio/bss_log.c @@ -101,7 +101,7 @@ static const BIO_METHOD methods_slg = { const BIO_METHOD *BIO_s_log(void) { - return (&methods_slg); + return &methods_slg; } static int slg_new(BIO *bi) @@ -116,7 +116,7 @@ static int slg_new(BIO *bi) static int slg_free(BIO *a) { if (a == NULL) - return (0); + return 0; xcloselog(a); return 1; } @@ -196,7 +196,7 @@ static int slg_write(BIO *b, const char *in, int inl) }; if ((buf = OPENSSL_malloc(inl + 1)) == NULL) { - return (0); + return 0; } strncpy(buf, in, inl); buf[inl] = '\0'; @@ -210,7 +210,7 @@ static int slg_write(BIO *b, const char *in, int inl) xsyslog(b, priority, pp); OPENSSL_free(buf); - return (ret); + return ret; } static long slg_ctrl(BIO *b, int cmd, long num, void *ptr) @@ -223,7 +223,7 @@ static long slg_ctrl(BIO *b, int cmd, long num, void *ptr) default: break; } - return (0); + return 0; } static int slg_puts(BIO *bp, const char *str) @@ -232,7 +232,7 @@ static int slg_puts(BIO *bp, const char *str) n = strlen(str); ret = slg_write(bp, str, n); - return (ret); + return ret; } # if defined(OPENSSL_SYS_WIN32) diff --git a/crypto/bio/bss_mem.c b/crypto/bio/bss_mem.c index 49ac1da024..621472594a 100644 --- a/crypto/bio/bss_mem.c +++ b/crypto/bio/bss_mem.c @@ -70,7 +70,7 @@ typedef struct bio_buf_mem_st { const BIO_METHOD *BIO_s_mem(void) { - return (&mem_method); + return &mem_method; } const BIO_METHOD *BIO_s_secmem(void) @@ -130,23 +130,23 @@ static int mem_init(BIO *bi, unsigned long flags) static int mem_new(BIO *bi) { - return (mem_init(bi, 0L)); + return mem_init(bi, 0L); } static int secmem_new(BIO *bi) { - return (mem_init(bi, BUF_MEM_FLAG_SECURE)); + return mem_init(bi, BUF_MEM_FLAG_SECURE); } static int mem_free(BIO *a) { - return (mem_buf_free(a, 1)); + return mem_buf_free(a, 1); } static int mem_buf_free(BIO *a, int free_all) { if (a == NULL) - return (0); + return 0; if (a->shutdown) { if ((a->init) && (a->ptr != NULL)) { BUF_MEM *b; @@ -182,7 +182,7 @@ static int mem_buf_sync(BIO *b) bbm->readp->data = bbm->buf->data; } } - return (0); + return 0; } static int mem_read(BIO *b, char *out, int outl) @@ -202,7 +202,7 @@ static int mem_read(BIO *b, char *out, int outl) if (ret != 0) BIO_set_retry_read(b); } - return (ret); + return ret; } static int mem_write(BIO *b, const char *in, int inl) @@ -228,7 +228,7 @@ static int mem_write(BIO *b, const char *in, int inl) *bbm->readp = *bbm->buf; ret = inl; end: - return (ret); + return ret; } static long mem_ctrl(BIO *b, int cmd, long num, void *ptr) @@ -305,7 +305,7 @@ static long mem_ctrl(BIO *b, int cmd, long num, void *ptr) ret = 0; break; } - return (ret); + return ret; } static int mem_gets(BIO *bp, char *buf, int size) @@ -341,7 +341,7 @@ static int mem_gets(BIO *bp, char *buf, int size) if (i > 0) buf[i] = '\0'; ret = i; - return (ret); + return ret; } static int mem_puts(BIO *bp, const char *str) @@ -351,5 +351,5 @@ static int mem_puts(BIO *bp, const char *str) n = strlen(str); ret = mem_write(bp, str, n); /* memory semantics is that it will always work */ - return (ret); + return ret; } diff --git a/crypto/bio/bss_null.c b/crypto/bio/bss_null.c index 14964d3985..13982c0851 100644 --- a/crypto/bio/bss_null.c +++ b/crypto/bio/bss_null.c @@ -38,7 +38,7 @@ static const BIO_METHOD null_method = { const BIO_METHOD *BIO_s_null(void) { - return (&null_method); + return &null_method; } static int null_new(BIO *bi) @@ -52,18 +52,18 @@ static int null_new(BIO *bi) static int null_free(BIO *a) { if (a == NULL) - return (0); + return 0; return 1; } static int null_read(BIO *b, char *out, int outl) { - return (0); + return 0; } static int null_write(BIO *b, const char *in, int inl) { - return (inl); + return inl; } static long null_ctrl(BIO *b, int cmd, long num, void *ptr) @@ -88,17 +88,17 @@ static long null_ctrl(BIO *b, int cmd, long num, void *ptr) ret = 0; break; } - return (ret); + return ret; } static int null_gets(BIO *bp, char *buf, int size) { - return (0); + return 0; } static int null_puts(BIO *bp, const char *str) { if (str == NULL) - return (0); - return (strlen(str)); + return 0; + return strlen(str); } diff --git a/crypto/bio/bss_sock.c b/crypto/bio/bss_sock.c index 6ff0f663ed..09f127b92d 100644 --- a/crypto/bio/bss_sock.c +++ b/crypto/bio/bss_sock.c @@ -53,7 +53,7 @@ static const BIO_METHOD methods_sockp = { const BIO_METHOD *BIO_s_socket(void) { - return (&methods_sockp); + return &methods_sockp; } BIO *BIO_new_socket(int fd, int close_flag) @@ -62,9 +62,9 @@ BIO *BIO_new_socket(int fd, int close_flag) ret = BIO_new(BIO_s_socket()); if (ret == NULL) - return (NULL); + return NULL; BIO_set_fd(ret, fd, close_flag); - return (ret); + return ret; } static int sock_new(BIO *bi) @@ -79,7 +79,7 @@ static int sock_new(BIO *bi) static int sock_free(BIO *a) { if (a == NULL) - return (0); + return 0; if (a->shutdown) { if (a->init) { BIO_closesocket(a->num); @@ -103,7 +103,7 @@ static int sock_read(BIO *b, char *out, int outl) BIO_set_retry_read(b); } } - return (ret); + return ret; } static int sock_write(BIO *b, const char *in, int inl) @@ -117,7 +117,7 @@ static int sock_write(BIO *b, const char *in, int inl) if (BIO_sock_should_retry(ret)) BIO_set_retry_write(b); } - return (ret); + return ret; } static long sock_ctrl(BIO *b, int cmd, long num, void *ptr) @@ -155,7 +155,7 @@ static long sock_ctrl(BIO *b, int cmd, long num, void *ptr) ret = 0; break; } - return (ret); + return ret; } static int sock_puts(BIO *bp, const char *str) @@ -164,7 +164,7 @@ static int sock_puts(BIO *bp, const char *str) n = strlen(str); ret = sock_write(bp, str, n); - return (ret); + return ret; } int BIO_sock_should_retry(int i) @@ -174,9 +174,9 @@ int BIO_sock_should_retry(int i) if ((i == 0) || (i == -1)) { err = get_last_socket_error(); - return (BIO_sock_non_fatal_error(err)); + return BIO_sock_non_fatal_error(err); } - return (0); + return 0; } int BIO_sock_non_fatal_error(int err) @@ -227,7 +227,7 @@ int BIO_sock_non_fatal_error(int err) default: break; } - return (0); + return 0; } #endif /* #ifndef OPENSSL_NO_SOCK */ |