mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-23 21:43:51 +01:00
Merge pull request #11184 from gschorcht/cpu/esp32/esp_wifi/iol_len
cpu/esp32: esp_wifi doesn't call memcpy if iol_len is 0
This commit is contained in:
commit
af65d2da59
@ -298,8 +298,10 @@ static int _esp_wifi_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