1
0
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:
Lotte Steenbrink 2014-11-25 12:01:21 -08:00
parent 1649ff9a61
commit c0ffbf52d2

View File

@ -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)