Fix returned buffer free space.
This commit is contained in:
parent
be43181505
commit
39a1493bcd
@ -319,7 +319,7 @@ int iso_ring_buffer_get_status(struct burn_source *b, size_t *size,
|
|||||||
*size = buf->cap;
|
*size = buf->cap;
|
||||||
}
|
}
|
||||||
if (free_bytes) {
|
if (free_bytes) {
|
||||||
*free_bytes = buf->size;
|
*free_bytes = buf->cap - buf->size;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = (buf->rend + 1) + (buf->wend ? 4 : 0);
|
ret = (buf->rend + 1) + (buf->wend ? 4 : 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user