Use C syntax, not FORTRAN or whatever that was :-)
This commit is contained in:
parent
a545c6f6b1
commit
ccc265eaa7
1 changed files with 9 additions and 5 deletions
|
@ -210,16 +210,20 @@ static long mem_ctrl(BIO *b, int cmd, long num, void *ptr)
|
||||||
switch (cmd)
|
switch (cmd)
|
||||||
{
|
{
|
||||||
case BIO_CTRL_RESET:
|
case BIO_CTRL_RESET:
|
||||||
if (bm->data != NULL) {
|
if (bm->data != NULL)
|
||||||
|
{
|
||||||
/* For read only case reset to the start again */
|
/* For read only case reset to the start again */
|
||||||
if(b->flags & BIO_FLAGS_MEM_RDONLY)
|
if(b->flags & BIO_FLAGS_MEM_RDONLY)
|
||||||
bm->data -= bm->max - bm->length;
|
{
|
||||||
bm->length = bm->max;
|
bm->data -= bm->max - bm->length;
|
||||||
else {
|
bm->length = bm->max;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
memset(bm->data,0,bm->max);
|
memset(bm->data,0,bm->max);
|
||||||
bm->length=0;
|
bm->length=0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case BIO_CTRL_EOF:
|
case BIO_CTRL_EOF:
|
||||||
ret=(long)(bm->length == 0);
|
ret=(long)(bm->length == 0);
|
||||||
|
|
Loading…
Reference in a new issue