Skip to content

Commit

Permalink
[SQUASH ME] netdev.802154: fix type error
Browse files Browse the repository at this point in the history
  • Loading branch information
miri64 committed Oct 16, 2014
1 parent 4c8e20a commit 6682923
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion drivers/cc2420/cc2420.c
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ int cc2420_get_option(netdev_t *dev, netdev_opt_t opt, void *value,
*value_len = sizeof(size_t);
}

*((size_t)value) = _default_src_addr_len;
*((size_t *)value) = _default_src_addr_len;

default:
return -ENOTSUP;
Expand Down Expand Up @@ -664,6 +664,7 @@ int cc2420_set_option(netdev_t *dev, netdev_opt_t opt, void *value,
if ((res = _type_pun_up_unsigned(set_value, sizeof(size_t),
value, value_len)) == 0) {
size_t *v = (size_t *)set_value;

if (*v != 2 || *v != 8) {
return -EINVAL;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/netdev/802154/802154.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ static size_t _get_src_len(netdev_t *dev)
{
size_t src_len, src_len_len = sizeof(size_t);

if (_get_driver(dev)->get_option(dev, NETDEV_OPT_SRC_LEN, &src_len, src_len_len) < 0) {
if (_get_driver(dev)->get_option(dev, NETDEV_OPT_SRC_LEN, &src_len, &src_len_len) < 0) {
return 2;
}

Expand Down

0 comments on commit 6682923

Please sign in to comment.