Skip to content

Commit ce064de

Browse files
committed
clean up
1 parent 8285277 commit ce064de

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/common/tusb_fifo.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,8 @@ static void _ff_push_n(tu_fifo_t* f, void const * app_buf, uint16_t n, uint16_t
178178
// Write data to linear part of buffer
179179
memcpy(ff_buf, app_buf, nLin_bytes);
180180

181-
TU_ASSERT(nWrap_bytes <= f->depth, );
181+
// Write data wrapped around
182+
// TU_ASSERT(nWrap_bytes <= f->depth, );
182183
memcpy(f->buffer, ((uint8_t const*) app_buf) + nLin_bytes, nWrap_bytes);
183184
}
184185
break;
@@ -504,7 +505,8 @@ static uint16_t _tu_fifo_write_n(tu_fifo_t* f, const void * data, uint16_t n, tu
504505

505506
// We start writing at the read pointer's position since we fill the whole buffer
506507
wr_idx = rd_idx;
507-
}else if (overflowable_count + n >= 2*f->depth)
508+
}
509+
else if (overflowable_count + n >= 2*f->depth)
508510
{
509511
// Double overflowed
510512
// re-position write index to have a full fifo after pushed

0 commit comments

Comments
 (0)