summaryrefslogtreecommitdiffstats
path: root/crypto/bio/bss_mem.c
diff options
context:
space:
mode:
authorFdaSilvaYY <fdasilvayy@gmail.com>2016-06-29 00:18:50 +0200
committerRich Salz <rsalz@openssl.org>2016-07-20 13:21:53 +0200
commite8aa8b6c8f6d4e2b2bbd5e5721d977b0a6aa3cee (patch)
tree9112c06d1c60edbbe94b3407f33538a0f9bf1c97 /crypto/bio/bss_mem.c
parentRemove reduntant X509_STORE_CTX_set_verify_cb declaration (diff)
downloadopenssl-e8aa8b6c8f6d4e2b2bbd5e5721d977b0a6aa3cee.tar.xz
openssl-e8aa8b6c8f6d4e2b2bbd5e5721d977b0a6aa3cee.zip
Fix a few if(, for(, while( inside code.
Fix some indentation at the same time Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1292)
Diffstat (limited to 'crypto/bio/bss_mem.c')
-rw-r--r--crypto/bio/bss_mem.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/bio/bss_mem.c b/crypto/bio/bss_mem.c
index 80da3a1e09..a61ab7cc64 100644
--- a/crypto/bio/bss_mem.c
+++ b/crypto/bio/bss_mem.c
@@ -144,12 +144,12 @@ static int mem_buf_free(BIO *a, int free_all)
BUF_MEM *b;
BIO_BUF_MEM *bb = (BIO_BUF_MEM *)a->ptr;
- if(bb != NULL) {
+ if (bb != NULL) {
b = bb->buf;
if (a->flags & BIO_FLAGS_MEM_RDONLY)
b->data = NULL;
BUF_MEM_free(b);
- if(free_all) {
+ if (free_all) {
OPENSSL_free(bb->readp);
OPENSSL_free(bb);
}
@@ -165,10 +165,10 @@ static int mem_buf_free(BIO *a, int free_all)
*/
static int mem_buf_sync(BIO *b)
{
- if((b != NULL) && (b->init) && (b->ptr != NULL)) {
+ if (b != NULL && b->init != 0 && b->ptr != NULL) {
BIO_BUF_MEM *bbm = (BIO_BUF_MEM *)b->ptr;
- if(bbm->readp->data != bbm->buf->data) {
+ if (bbm->readp->data != bbm->buf->data) {
memmove(bbm->buf->data, bbm->readp->data, bbm->readp->length);
bbm->buf->length = bbm->readp->length;
bbm->readp->data = bbm->buf->data;