Merge pull request #11186 from gschorcht/cpu/esp32/esp_eth/iol_len
cpu/esp32: esp_eth doesn't call memcpy if iol_len is 0
This commit is contained in:
commit
2d906de873
@ -200,8 +200,10 @@ static int _esp_eth_send(netdev_t *netdev, const iolist_t *iolist)
|
||||
mutex_unlock(&dev->dev_lock);
|
||||
return -EOVERFLOW;
|
||||
}
|
||||
memcpy (dev->tx_buf + dev->tx_len, iol->iol_base, iol->iol_len);
|
||||
dev->tx_len += iol->iol_len;
|
||||
if (iol->iol_len) {
|
||||
memcpy (dev->tx_buf + dev->tx_len, iol->iol_base, iol->iol_len);
|
||||
dev->tx_len += iol->iol_len;
|
||||
}
|
||||
}
|
||||
|
||||
#if ENABLE_DEBUG
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user