1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

gnrc_rpl: remove redundant iface variable

This commit is contained in:
Martine Lenders 2017-11-23 22:59:13 +01:00
parent 423fc74bd2
commit 97b0db61ca

View File

@ -340,7 +340,6 @@ gnrc_rpl_instance_t *gnrc_rpl_root_instance_init(uint8_t instance_id, ipv6_addr_
gnrc_netif_t *netif;
gnrc_rpl_instance_t *inst = NULL;
gnrc_rpl_dodag_t *dodag = NULL;
kernel_pid_t iface;
if (!(ipv6_addr_is_global(dodag_id) || ipv6_addr_is_unique_local_unicast(dodag_id))) {
DEBUG("RPL: dodag id (%s) must be a global or unique local IPv6 address\n",
@ -353,7 +352,6 @@ gnrc_rpl_instance_t *gnrc_rpl_root_instance_init(uint8_t instance_id, ipv6_addr_
ipv6_addr_to_str(addr_str, dodag_id, sizeof(addr_str)));
return NULL;
}
iface = netif->pid;
if (gnrc_rpl_instance_add(instance_id, &inst)) {
inst->of = (gnrc_rpl_of_t *) gnrc_rpl_get_of_for_ocp(GNRC_RPL_DEFAULT_OCP);
@ -370,7 +368,7 @@ gnrc_rpl_instance_t *gnrc_rpl_root_instance_init(uint8_t instance_id, ipv6_addr_
return NULL;
}
if (!gnrc_rpl_dodag_init(inst, dodag_id, iface)) {
if (!gnrc_rpl_dodag_init(inst, dodag_id, netif->pid)) {
DEBUG("RPL: could not initialize DODAG\n");
gnrc_rpl_instance_remove(inst);
return NULL;