summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2025-09-04 13:11:54 +0700
committerGitHub <[email protected]>2025-09-04 13:11:54 +0700
commit93487deab7449261fd42a2b7ceeffdbec469dc83 (patch)
treeadeeb2b8ec2c9bc3eab65ad127a9e736e2f3a006
parent2c0e360c73726225ad5f0f3dc01752a02b2c4ac6 (diff)
parentda9284e88baefc6d0e5f7c624f8f7da7f4d6aed0 (diff)
Merge pull request #3230 from hathach/copilot/fix-3218
Fix obsolete cnt assignment in _tu_fifo_peek() overflow check
-rw-r--r--src/common/tusb_fifo.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/common/tusb_fifo.c b/src/common/tusb_fifo.c
index ecf002b09..f7679556f 100644
--- a/src/common/tusb_fifo.c
+++ b/src/common/tusb_fifo.c
@@ -428,7 +428,6 @@ static bool _tu_fifo_peek(tu_fifo_t* f, void * p_buffer, uint16_t wr_idx, uint16
if ( cnt > f->depth )
{
rd_idx = _ff_correct_read_index(f, wr_idx);
- cnt = f->depth;
}
uint16_t rd_ptr = idx2ptr(f->depth, rd_idx);