stuff
This commit is contained in:
parent
39e46a072f
commit
821b3b26c6
|
@ -31,7 +31,7 @@ error_t BGetFromBuf(Buffer_t *buf, uchar *ch)
|
||||||
assert(buf && buf->initDone == INITOK);
|
assert(buf && buf->initDone == INITOK);
|
||||||
|
|
||||||
if (!buf) return EINVAL;
|
if (!buf) return EINVAL;
|
||||||
if (buf->state != BS_RDWR && buf->state != BS_RDONLY) {
|
if (buf->flags & BUF_TERM || buf->state != BS_RDWR && buf->state != BS_RDONLY) {
|
||||||
return EBADF;
|
return EBADF;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,6 +47,12 @@ error_t bgetc(Buffer_t *buf, uchar *ch)
|
||||||
|
|
||||||
if (buf->flags & (BF_EOF|BF_ERR)) return EENDF;
|
if (buf->flags & (BF_EOF|BF_ERR)) return EENDF;
|
||||||
|
|
||||||
return EOK;
|
if (
|
||||||
|
|
||||||
|
if (rc != EOK) {
|
||||||
|
// buf->flags |= BF_ERR;
|
||||||
|
}
|
||||||
|
|
||||||
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue