mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-04 23:29:25 +00:00
Drop unnecessary NULL test for h->next->next in memp_sanity
The h will point to NULL if h->next->next is NULL anyway. So remove the unnecessary NULL test for h->next->next in each iteration. Signed-off-by: Axel Lin <axel.lin@ingics.com>
This commit is contained in:
parent
21b9b5e741
commit
9c6708513a
@ -91,7 +91,7 @@ memp_sanity(const struct memp_desc *desc)
|
||||
t = *desc->tab;
|
||||
if (t != NULL) {
|
||||
for (h = t->next; (t != NULL) && (h != NULL); t = t->next,
|
||||
h = (((h->next != NULL) && (h->next->next != NULL)) ? h->next->next : NULL)) {
|
||||
h = ((h->next != NULL) ? h->next->next : NULL)) {
|
||||
if (t == h) {
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user