projects
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
a545c6f
)
Use C syntax, not FORTRAN or whatever that was :-)
author
Bodo Möller
<bodo@openssl.org>
Fri, 1 Sep 2000 10:40:37 +0000
(10:40 +0000)
committer
Bodo Möller
<bodo@openssl.org>
Fri, 1 Sep 2000 10:40:37 +0000
(10:40 +0000)
crypto/bio/bss_mem.c
patch
|
blob
|
history
diff --git
a/crypto/bio/bss_mem.c
b/crypto/bio/bss_mem.c
index 4fa2cf15a4845d785cc2e430feb84dc41da2b988..d4d956c619ab121fa5e7f770f0cabc2522e2d928 100644
(file)
--- 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:
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)
/* 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;
memset(bm->data,0,bm->max);
bm->length=0;
+ }
}
}
- }
break;
case BIO_CTRL_EOF:
ret=(long)(bm->length == 0);
break;
case BIO_CTRL_EOF:
ret=(long)(bm->length == 0);