mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
nrfmin: fix type for NETOPT_PROTO
The type [is documented as `gnrc_nettype_t`][1] so it should by checked
as such.
[1]: f9a3bdf1a7/sys/include/net/netopt.h (L210-L212)
This commit is contained in:
parent
f9a3bdf1a7
commit
4e53f0fa76
@ -490,9 +490,9 @@ static int nrfmin_get(netdev_t *dev, netopt_t opt, void *val, size_t max_len)
|
||||
return sizeof(uint16_t);
|
||||
#ifdef MODULE_GNRC_SIXLOWPAN
|
||||
case NETOPT_PROTO:
|
||||
assert(max_len >= sizeof(uint16_t));
|
||||
*((uint16_t *)val) = GNRC_NETTYPE_SIXLOWPAN;
|
||||
return sizeof(uint16_t);
|
||||
assert(max_len == sizeof(gnrc_nettype_t));
|
||||
*((gnrc_nettype_t *)val) = GNRC_NETTYPE_SIXLOWPAN;
|
||||
return sizeof(gnrc_nettype_t);
|
||||
#endif
|
||||
case NETOPT_DEVICE_TYPE:
|
||||
assert(max_len >= sizeof(uint16_t));
|
||||
|
Loading…
Reference in New Issue
Block a user