#define VLIB_REMOVE_FROM_LINKED_LIST(first,p,next) \
{ \
+ ASSERT (first); \
if (first == p) \
first = (p)->next; \
else \
{ \
__typeof__ (p) current = first; \
- while (current->next) \
- { \
- if (current->next == p) \
- { \
- current->next = current->next->next; \
- break; \
- } \
- current = current->next; \
- } \
+ while (current->next) \
+ { \
+ if (current->next == p) \
+ { \
+ current->next = current->next->next; \
+ break; \
+ } \
+ current = current->next; \
+ } \
+ ASSERT (current); \
} \
}