diff options
Diffstat (limited to 'src/util')
| -rw-r--r-- | src/util/blocking_ring_buffer.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/util/blocking_ring_buffer.c b/src/util/blocking_ring_buffer.c index 2160fec..5cc3325 100644 --- a/src/util/blocking_ring_buffer.c +++ b/src/util/blocking_ring_buffer.c @@ -89,9 +89,7 @@ u8 *camu_ring_buffer_get_chunk(struct camu_ring_buffer *buffer, s32 n) { aki_mutex_lock(&buffer->mutex); - if (!buffer->enabled) { - return NULL; - } + if (!buffer->enabled) return NULL; if (buffer->end < buffer->start) { if (buffer->end + n > buffer->size) { @@ -145,9 +143,7 @@ s32 camu_ring_buffer_read(struct camu_ring_buffer *buffer, u8 **data, s32 n) *data = &buffer->data[buffer->start]; // If start == end, the buffer is empty. - if (buffer->start == buffer->end) { - return 0; - } + if (buffer->start == buffer->end) return 0; if (buffer->end < buffer->start) { // If we would read past the valid data in the buffer, instead @@ -191,9 +187,7 @@ void camu_ring_buffer_unlock(struct camu_ring_buffer *buffer) void camu_ring_buffer_free(struct camu_ring_buffer *buffer) { - if (buffer->data) { - al_free(buffer->data); - } + if (buffer->data) al_free(buffer->data); aki_mutex_destroy(&buffer->mutex); aki_cond_destroy(&buffer->cond); } |