Add unit test for dir iteration. Implementation of iso_dir_iter_free().
This commit is contained in:
@ -256,6 +256,7 @@ int iso_dir_iter_next(IsoDirIter *iter, IsoNode **node)
|
||||
}
|
||||
n = iter->pos;
|
||||
if (n == NULL) {
|
||||
*node = NULL;
|
||||
return 0;
|
||||
}
|
||||
if (n->parent != iter->dir) {
|
||||
@ -283,6 +284,11 @@ int iso_dir_iter_has_next(IsoDirIter *iter)
|
||||
return iter->pos == NULL ? 0 : 1;
|
||||
}
|
||||
|
||||
void iso_dir_iter_free(IsoDirIter *iter)
|
||||
{
|
||||
free(iter);
|
||||
}
|
||||
|
||||
static IsoNode**
|
||||
iso_dir_find_node(IsoDir *dir, IsoNode *node)
|
||||
{
|
||||
|
Reference in New Issue
Block a user