aboutsummaryrefslogtreecommitdiff
path: root/crypto/bio/bss_mem.c
diff options
context:
space:
mode:
authorBodo Möller <bodo@openssl.org>2000-09-01 10:40:37 +0000
committerBodo Möller <bodo@openssl.org>2000-09-01 10:40:37 +0000
commitccc265eaa7a0af0e52aab6961ac3ddd9e5a22156 (patch)
treed0c7c7209f5f7cde8bd4ae83b4ba6dfe6096ade3 /crypto/bio/bss_mem.c
parenta545c6f6b1ccc2265fcd0b304b742020e3708013 (diff)
downloadopenssl-ccc265eaa7a0af0e52aab6961ac3ddd9e5a22156.zip
openssl-ccc265eaa7a0af0e52aab6961ac3ddd9e5a22156.tar.gz
openssl-ccc265eaa7a0af0e52aab6961ac3ddd9e5a22156.tar.bz2
Use C syntax, not FORTRAN or whatever that was :-)
Diffstat (limited to 'crypto/bio/bss_mem.c')
-rw-r--r--crypto/bio/bss_mem.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/crypto/bio/bss_mem.c b/crypto/bio/bss_mem.c
index 4fa2cf1..d4d956c 100644
--- a/crypto/bio/bss_mem.c
+++ b/crypto/bio/bss_mem.c
@@ -210,16 +210,20 @@ static long mem_ctrl(BIO *b, int cmd, long num, void *ptr)
switch (cmd)
{
case BIO_CTRL_RESET:
- if (bm->data != NULL) {
+ if (bm->data != NULL)
+ {
/* For read only case reset to the start again */
if(b->flags & BIO_FLAGS_MEM_RDONLY)
- bm->data -= bm->max - bm->length;
- bm->length = bm->max;
- else {
+ {
+ bm->data -= bm->max - bm->length;
+ bm->length = bm->max;
+ }
+ else
+ {
memset(bm->data,0,bm->max);
bm->length=0;
+ }
}
- }
break;
case BIO_CTRL_EOF:
ret=(long)(bm->length == 0);