tty-ask-pwd-agent: minor simplification by using FOREACH_DIRENT instead of FOREACH_DIRENT_ALL

This commit is contained in:
Franck Bui 2019-09-17 12:30:31 +02:00
parent 27c3112dcb
commit 1503bcb12e

View file

@ -462,7 +462,7 @@ static int process_password_files(void) {
return log_error_errno(errno, "Failed to open /run/systemd/ask-password: %m");
}
FOREACH_DIRENT_ALL(de, d, return log_error_errno(errno, "Failed to read directory: %m")) {
FOREACH_DIRENT(de, d, return log_error_errno(errno, "Failed to read directory: %m")) {
_cleanup_free_ char *p = NULL;
int q;
@ -472,9 +472,6 @@ static int process_password_files(void) {
if (de->d_type != DT_REG)
continue;
if (hidden_or_backup_file(de->d_name))
continue;
if (!startswith(de->d_name, "ask."))
continue;