Skip to content

Commit 67978f8

Browse files
Nicolas Pitrekartben
authored andcommitted
ring_buffer: delete redundant code
No need to clamp requested size as ring_buf_get_claim() does it already. Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
1 parent 92c5284 commit 67978f8

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

lib/utils/ring_buffer.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,6 @@ uint32_t ring_buf_peek(struct ring_buf *buf, uint8_t *data, uint32_t size)
152152
uint32_t total_size = 0U;
153153
int err;
154154

155-
size = MIN(size, ring_buf_size_get(buf));
156-
157155
do {
158156
partial_size = ring_buf_get_claim(buf, &src, size);
159157
__ASSERT_NO_MSG(data != NULL);

0 commit comments

Comments
 (0)