library: standardize extents_free_all() logic, 3rd gen
As those 3rd generation newlib APIs evolved so too did the extents_free_all() function. Most versions of this function required the callers to first verify that the extents anchor wasn't empty, which was poor etiquette. This simple function should have been much more robust and forgiving. With this commit, it fnally becomes so. Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
@ -319,11 +319,11 @@ static inline void cleanup_stacks_all (
|
||||
static void extents_free_all (
|
||||
struct ext_support *this)
|
||||
{
|
||||
do {
|
||||
while (this->extents) {
|
||||
struct stacks_extent *p = this->extents;
|
||||
this->extents = this->extents->next;
|
||||
free(p);
|
||||
} while (this->extents);
|
||||
};
|
||||
} // end: extents_free_all
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user