提交 ccc265ea 编写于 作者: B Bodo Möller

Use C syntax, not FORTRAN or whatever that was :-)

上级 a545c6f6
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册