kernel: mem_domain: remove redundant clearing of mem_partition fields

When a memory partition is removed, it is not required
to clear the start and attr fields, since a free partition
is only indicated by a zero size field. This commit removes
the un-necessary clearing of start and attr fields.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit is contained in:
Ioannis Glaropoulos 2018-12-03 14:21:54 +01:00 committed by Anas Nashif
commit ccf813c22a

View file

@ -198,9 +198,8 @@ void k_mem_domain_remove_partition(struct k_mem_domain *domain,
_arch_mem_domain_partition_remove(domain, p_idx);
}
domain->partitions[p_idx].start = 0;
/* A zero-sized partition denotes it's a free partition */
domain->partitions[p_idx].size = 0;
domain->partitions[p_idx].attr = 0;
domain->num_partitions--;