| 53 | }; |
| 54 | |
| 55 | static int next_directory_entry(DIR *dir, const char *path, |
| 56 | struct dirent **out) |
| 57 | { |
| 58 | struct dirent *de; |
| 59 | |
| 60 | repeat: |
| 61 | errno = 0; |
| 62 | de = readdir(dir); |
| 63 | if (!de) { |
| 64 | if (errno) { |
| 65 | warning_errno("error reading directory '%s'", |
| 66 | path); |
| 67 | return -1; |
| 68 | } |
| 69 | |
| 70 | return 1; |
| 71 | } |
| 72 | |
| 73 | if (is_dot_or_dotdot(de->d_name)) |
| 74 | goto repeat; |
| 75 | |
| 76 | *out = de; |
| 77 | return 0; |
| 78 | } |
| 79 | |
| 80 | /* |
| 81 | * Push a level in the iter stack and initialize it with information from |
no test coverage detected