Skip to content
Snippets Groups Projects
Commit e5d5c373 authored by Oleg Hahm's avatar Oleg Hahm
Browse files

Merge pull request #3654 from OlegHahm/rpl_scan_findings

RPL: clang analyzer findings
parents 147bf75d 687cc6e1
Branches
No related tags found
No related merge requests found
......@@ -151,6 +151,9 @@ static void _receive(ng_pktsnip_t *icmpv6)
icmpv6_hdr_t *icmpv6_hdr = NULL;
LL_SEARCH_SCALAR(icmpv6, ipv6, type, NG_NETTYPE_IPV6);
assert(ipv6 != NULL);
ipv6_hdr = (ipv6_hdr_t *)ipv6->data;
icmpv6_hdr = (icmpv6_hdr_t *)icmpv6->data;
......
......@@ -137,7 +137,6 @@ void ng_rpl_send_DIO(ng_rpl_dodag_t *dodag, ipv6_addr_t *destination)
dodag_conf->reserved = 0;
dodag_conf->default_lifetime = dodag->default_lifetime;
dodag_conf->lifetime_unit = byteorder_htons(dodag->lifetime_unit);
pos += sizeof(*dodag_conf);
}
dodag->dodag_conf_counter++;
......@@ -403,6 +402,9 @@ void ng_rpl_recv_DIO(ng_rpl_dio_t *dio, ipv6_addr_t *src, uint16_t len)
trickle_increment_counter(&dodag->trickle);
}
/* ng_rpl_parent_add_by_addr should have set this already */
assert(parent != NULL);
parent->rank = byteorder_ntohs(dio->rank);
if(!_parse_options(NG_RPL_ICMPV6_CODE_DIO, dodag, (ng_rpl_opt_t *)(dio + 1), len, NULL)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment