[PATCH v2 3/4] lib: list_sort_test(): Simplify and harden cleanup

2014-06-24 Thread Rasmus Villemoes
There is no reason to maintain the list structure while freeing the debug elements. Aside from the redundant pointer manipulations, it is also inefficient from a locality-of-reference viewpoint, since they are visited in a random order (wrt. the order they were allocated). Furthermore, if we

[PATCH v2 3/4] lib: list_sort_test(): Simplify and harden cleanup

2014-06-24 Thread Rasmus Villemoes
There is no reason to maintain the list structure while freeing the debug elements. Aside from the redundant pointer manipulations, it is also inefficient from a locality-of-reference viewpoint, since they are visited in a random order (wrt. the order they were allocated). Furthermore, if we