1
0
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:
Martine Lenders 2019-04-02 19:08:15 +02:00 committed by GitHub
commit af65d2da59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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