diff --git a/src/common/container.c b/src/common/container.c index f3db56c6a0..afad890de8 100644 --- a/src/common/container.c +++ b/src/common/container.c @@ -228,6 +228,7 @@ smartlist_del(smartlist_t *sl, int idx) tor_assert(idx < sl->num_used); sl->list[idx] = sl->list[--sl->num_used]; } + /** Remove the idxth element of sl; if idx is not the last element, * moving all subsequent elements back one space. Return the old value * of the idxth element. @@ -242,6 +243,7 @@ smartlist_del_keeporder(smartlist_t *sl, int idx) if (idx < sl->num_used) memmove(sl->list+idx, sl->list+idx+1, sizeof(void*)*(sl->num_used-idx)); } + /** Insert the value val as the new idxth element of * sl, moving all items previously at idx or later * forward one space.