* Pop the top level on the iter stack, releasing any resources associated * with it. Return the new value of iter->levels_nr. */
| 143 | * with it. Return the new value of iter->levels_nr. |
| 144 | */ |
| 145 | static int pop_level(struct dir_iterator_int *iter) |
| 146 | { |
| 147 | struct dir_iterator_level *level = |
| 148 | &iter->levels[iter->levels_nr - 1]; |
| 149 | |
| 150 | if (level->dir && closedir(level->dir)) |
| 151 | warning_errno("error closing directory '%s'", |
| 152 | iter->base.path.buf); |
| 153 | level->dir = NULL; |
| 154 | string_list_clear(&level->entries, 0); |
| 155 | |
| 156 | return --iter->levels_nr; |
| 157 | } |
| 158 | |
| 159 | /* |
| 160 | * Populate iter->base with the necessary information on the next iteration |
no test coverage detected