Fix returned buffer free space.

This commit is contained in:
Vreixo Formoso 2008-01-25 13:02:14 +01:00
parent be43181505
commit 39a1493bcd

View File

@ -319,7 +319,7 @@ int iso_ring_buffer_get_status(struct burn_source *b, size_t *size,
*size = buf->cap;
}
if (free_bytes) {
*free_bytes = buf->size;
*free_bytes = buf->cap - buf->size;
}
ret = (buf->rend + 1) + (buf->wend ? 4 : 0);