Skip to content

Commit

Permalink
Remove ringbuffer.c trailing spaces (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrv96 authored Nov 13, 2024
1 parent e5ff131 commit 190e30b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ringbuffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ uint8_t ring_buffer_dequeue(ring_buffer_t *buffer, char *data) {
/* No items */
return 0;
}

*data = buffer->buffer[buffer->tail_index];
buffer->tail_index = ((buffer->tail_index + 1) & RING_BUFFER_MASK(buffer));
return 1;
Expand All @@ -65,7 +65,7 @@ uint8_t ring_buffer_peek(ring_buffer_t *buffer, char *data, ring_buffer_size_t i
/* No items at index */
return 0;
}

/* Add index to pointer */
ring_buffer_size_t data_index = ((buffer->tail_index + index) & RING_BUFFER_MASK(buffer));
*data = buffer->buffer[data_index];
Expand Down

0 comments on commit 190e30b

Please sign in to comment.