mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-29 03:14:04 +00:00
memp: Simplify implementation of memp_overflow_check_all
We don't really care the order of overflow/underflow checking because if any checking fails we got assertion. Signed-off-by: Axel Lin <axel.lin@ingics.com>
This commit is contained in:
parent
11faa8149e
commit
70ebeda7ed
@ -167,13 +167,6 @@ memp_overflow_check_all(void)
|
||||
p = (struct memp *)(size_t)(memp_pools[i]->base);
|
||||
for (j = 0; j < memp_pools[i]->num; ++j) {
|
||||
memp_overflow_check_element_overflow(p, memp_pools[i]);
|
||||
p = (struct memp*)(size_t)((u8_t*)p + MEMP_SIZE + memp_pools[i]->size + MEMP_SANITY_REGION_AFTER_ALIGNED);
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < MEMP_MAX; ++i) {
|
||||
p = (struct memp *)(size_t)(memp_pools[i]->base);
|
||||
for (j = 0; j < memp_pools[i]->num; ++j) {
|
||||
memp_overflow_check_element_underflow(p, memp_pools[i]);
|
||||
p = (struct memp*)(size_t)((u8_t*)p + MEMP_SIZE + memp_pools[i]->size + MEMP_SANITY_REGION_AFTER_ALIGNED);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user