[riot-notifications] [RIOT-OS/RIOT] cpu/esp_common: esp_now doesn't call memcpy if iol_len is 0 (#11187)

Martine Lenders notifications at github.com
Sat Mar 30 11:29:15 CET 2019


miri64 commented on this pull request.



> @@ -633,7 +633,7 @@ static int _send(netdev_t *netdev, const iolist_t *iolist)
     uint8_t* _esp_now_dst = NULL;
 
     for (uint8_t i = 0; i < ESP_NOW_ADDR_LEN; i++) {
-        if (((uint8_t*)iolist->iol_base)[i] != 0xff) {
+        if (iolist->iol_base != NULL && ((uint8_t*)iolist->iol_base)[i] != 0xff) {

> Ok, even though the compiler seems to be happy and doesn't warn.

It's not about the compiler but about [readability / style](https://github.com/RIOT-OS/RIOT/wiki/Coding-conventions#indentation-and-braces) ;-).

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/11187#discussion_r270620660
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190330/71d06462/attachment.html>


More information about the notifications mailing list