mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Simplify rpl_clear_routing_table()
Instead of looping over the entire table and setting every entry to 0, memset the entire table at once.
This commit is contained in:
parent
1649ff9a61
commit
c0ffbf52d2
@ -294,10 +294,7 @@ rpl_routing_entry_t *rpl_find_routing_entry(ipv6_addr_t *addr)
|
||||
|
||||
void rpl_clear_routing_table(void)
|
||||
{
|
||||
for (uint8_t i = 0; i < RPL_MAX_ROUTING_ENTRIES; i++) {
|
||||
memset(&rpl_routing_table[i], 0, sizeof(rpl_routing_table[i]));
|
||||
}
|
||||
|
||||
memset(&rpl_routing_table, 0, sizeof(rpl_routing_table));
|
||||
}
|
||||
|
||||
rpl_routing_entry_t *rpl_get_routing_table(void)
|
||||
|
Loading…
Reference in New Issue
Block a user