}
else
{
- if (m->current && m->current->next)
- /* Still have free chunks from previous incarnation (before lp_flush()) */
- c = m->current->next;
+ if (m->current)
+ {
+ /* Still have free chunks from previous incarnation (before lp_flush()) */
+ c = m->current;
+ m->current = c->next;
+ }
else
{
/* Need to allocate a new chunk */
m->plast = &c->next;
c->next = NULL;
}
- m->current = c;
m->ptr = c->data + size;
m->end = c->data + m->chunk_size;
}