From: Franck Bui Date: Tue, 17 Sep 2019 10:30:31 +0000 (+0200) Subject: tty-ask-pwd-agent: minor simplification by using FOREACH_DIRENT instead of FOREACH_DI... X-Git-Tag: v244-rc1~212^2~6 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1503bcb12ec9ae775a0b3435c9f2dfdd5204e09e;p=thirdparty%2Fsystemd.git tty-ask-pwd-agent: minor simplification by using FOREACH_DIRENT instead of FOREACH_DIRENT_ALL --- diff --git a/src/tty-ask-password-agent/tty-ask-password-agent.c b/src/tty-ask-password-agent/tty-ask-password-agent.c index f57f0ec261b..72b04e6f0e7 100644 --- a/src/tty-ask-password-agent/tty-ask-password-agent.c +++ b/src/tty-ask-password-agent/tty-ask-password-agent.c @@ -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;