On Fri, Aug 12, 2016 at 8:32 AM Costin Chirvasuta <costinc@gmail.com> wrote:
> So isn't the memmove just to cover the case where you are
> deleting a block that isn't at the very end?

Yes, but from what I understand i is always lower.

Say b->nbl starts at 10. i=b->nbl-1 so i=9. --i so i=8.
Inside delblock b->nbl-- so b->nbl is 9. i<nbl is true so the memmove happens.

Also delblock(b, 0) never seems to happen.

My apologies, I wasn't paying enough attention.  Yes, I think you're correct that if b->nbl is 10 it would start off with deblock(b, 8).

Why wouldn't delblock(b, 0) be called?  Wouldn't the sequence end up being 8,7,6,5,4,3,2,1,0, since only when it hits i=-1 would it evaluate to false?

Jim