mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-05 17:49:45 +00:00
fifo_buffer.c - nits
This commit is contained in:
parent
c518d35f18
commit
41acfb52d4
@ -48,7 +48,7 @@ void fifo_free(fifo_buffer_t *buffer)
|
||||
size_t fifo_read_avail(fifo_buffer_t *buffer)
|
||||
{
|
||||
size_t first = buffer->first;
|
||||
size_t end = buffer->end;
|
||||
size_t end = buffer->end;
|
||||
if (end < first)
|
||||
end += buffer->bufsize;
|
||||
return end - first;
|
||||
@ -57,7 +57,7 @@ size_t fifo_read_avail(fifo_buffer_t *buffer)
|
||||
size_t fifo_write_avail(fifo_buffer_t *buffer)
|
||||
{
|
||||
size_t first = buffer->first;
|
||||
size_t end = buffer->end;
|
||||
size_t end = buffer->end;
|
||||
if (end < first)
|
||||
end += buffer->bufsize;
|
||||
|
||||
@ -67,7 +67,8 @@ size_t fifo_write_avail(fifo_buffer_t *buffer)
|
||||
void fifo_write(fifo_buffer_t *buffer, const void *in_buf, size_t size)
|
||||
{
|
||||
size_t first_write = size;
|
||||
size_t rest_write = 0;
|
||||
size_t rest_write = 0;
|
||||
|
||||
if (buffer->end + size > buffer->bufsize)
|
||||
{
|
||||
first_write = buffer->bufsize - buffer->end;
|
||||
@ -84,7 +85,7 @@ void fifo_write(fifo_buffer_t *buffer, const void *in_buf, size_t size)
|
||||
void fifo_read(fifo_buffer_t *buffer, void *in_buf, size_t size)
|
||||
{
|
||||
size_t first_read = size;
|
||||
size_t rest_read = 0;
|
||||
size_t rest_read = 0;
|
||||
if (buffer->first + size > buffer->bufsize)
|
||||
{
|
||||
first_read = buffer->bufsize - buffer->first;
|
||||
|
Loading…
Reference in New Issue
Block a user