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,9 +200,11 @@ static int _esp_eth_send(netdev_t *netdev, const iolist_t *iolist)
|
|||||||
mutex_unlock(&dev->dev_lock);
|
mutex_unlock(&dev->dev_lock);
|
||||||
return -EOVERFLOW;
|
return -EOVERFLOW;
|
||||||
}
|
}
|
||||||
|
if (iol->iol_len) {
|
||||||
memcpy (dev->tx_buf + dev->tx_len, iol->iol_base, iol->iol_len);
|
memcpy (dev->tx_buf + dev->tx_len, iol->iol_base, iol->iol_len);
|
||||||
dev->tx_len += iol->iol_len;
|
dev->tx_len += iol->iol_len;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#if ENABLE_DEBUG
|
#if ENABLE_DEBUG
|
||||||
printf ("%s: send %d byte\n", __func__, dev->tx_len);
|
printf ("%s: send %d byte\n", __func__, dev->tx_len);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user