[riot-notifications] [RIOT-OS/RIOT] netdev/lora: fix size of NETOPT_RX_SYMBOL_TIMEOUT (#16604)

José Alamos notifications at github.com
Fri Jul 2 14:15:51 CEST 2021


@jia200x commented on this pull request.



> @@ -444,8 +444,8 @@ static int _set(netdev_t *netdev, netopt_t opt, const void *val, size_t len)
         return sizeof(netopt_enable_t);
 
     case NETOPT_RX_SYMBOL_TIMEOUT:
-        assert(len <= sizeof(uint16_t));
-        sx127x_set_symbol_timeout(dev, *((const uint16_t *)val));
+        assert(len <= sizeof(uint8_t));

> I think this is just making sure that the value is uint8_t, as it is checking len, not val.

Yes. This just checks that the data structure that holds `val` is not greater than 1 byte (uint8t_t)

-- 
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/16604#discussion_r662968505
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210702/003fd84b/attachment.htm>


More information about the notifications mailing list