diff options
| author | Ha Thach <[email protected]> | 2022-12-08 12:18:32 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-12-08 12:18:32 +0700 |
| commit | d4620d99d31b5566248d2f3a182d7c84633601af (patch) | |
| tree | 2d3ac0023cdbf5dae7e5f7df2575d3dbc420abd8 /src | |
| parent | ab8cfb3d5bbefcc3ff19a086070b0c83581d789d (diff) | |
| parent | c19bffb1d91dd7dad3365fce938b6d6687d4e5b0 (diff) | |
Merge pull request #1716 from silvergasp/master
fuzz: Add support for fuzzing
Diffstat (limited to 'src')
| -rw-r--r-- | src/class/cdc/cdc_device.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/class/cdc/cdc_device.c b/src/class/cdc/cdc_device.c index 77c73030a..7b1e08d5d 100644 --- a/src/class/cdc/cdc_device.c +++ b/src/class/cdc/cdc_device.c @@ -171,6 +171,7 @@ uint32_t tud_cdc_n_write(uint8_t itf, void const* buffer, uint32_t bufsize) uint16_t ret = tu_fifo_write_n(&p_cdc->tx_ff, buffer, (uint16_t) bufsize); // flush if queue more than packet size + // may need to suppress -Wunreachable-code since most of the time CFG_TUD_CDC_TX_BUFSIZE < BULK_PACKET_SIZE if ( (tu_fifo_count(&p_cdc->tx_ff) >= BULK_PACKET_SIZE) || ((CFG_TUD_CDC_TX_BUFSIZE < BULK_PACKET_SIZE) && tu_fifo_full(&p_cdc->tx_ff)) ) { tud_cdc_n_write_flush(itf); |
