Fix obsolete cnt assignment in _tu_fifo_peek() overflow check
Co-authored-by: hathach <249515+hathach@users.noreply.github.com>
This commit is contained in:
@@ -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 )
|
if ( cnt > f->depth )
|
||||||
{
|
{
|
||||||
rd_idx = _ff_correct_read_index(f, wr_idx);
|
rd_idx = _ff_correct_read_index(f, wr_idx);
|
||||||
cnt = f->depth;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16_t rd_ptr = idx2ptr(f->depth, rd_idx);
|
uint16_t rd_ptr = idx2ptr(f->depth, rd_idx);
|
||||||
|
Reference in New Issue
Block a user