diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2021-12-07 12:52:58 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2021-12-15 22:50:00 +0100 |
commit | af3b864d76cf916a026b7877099791811b348fdf (patch) | |
tree | 40db7161280edc4dcc24b8a0cd20514f45a3ea1f /src/basic/locale-util.c | |
parent | c7f0d9e5acef3f62db3640d5ab7446241c022b35 (diff) | |
download | systemd-af3b864d76cf916a026b7877099791811b348fdf.tar.gz |
Define FOREACH_DIRENT through FOREACH_DIRENT_ALL
As in the previous commit, 'de' is used as the iterator variable name.
Diffstat (limited to 'src/basic/locale-util.c')
-rw-r--r-- | src/basic/locale-util.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/basic/locale-util.c b/src/basic/locale-util.c index 9a7c7795e7..7f1a2f15f7 100644 --- a/src/basic/locale-util.c +++ b/src/basic/locale-util.c @@ -158,20 +158,19 @@ static int add_locales_from_archive(Set *locales) { static int add_locales_from_libdir (Set *locales) { _cleanup_closedir_ DIR *dir = NULL; - struct dirent *entry; int r; dir = opendir("/usr/lib/locale"); if (!dir) return errno == ENOENT ? 0 : -errno; - FOREACH_DIRENT(entry, dir, return -errno) { + FOREACH_DIRENT(de, dir, return -errno) { char *z; - if (entry->d_type != DT_DIR) + if (de->d_type != DT_DIR) continue; - z = normalize_locale(entry->d_name); + z = normalize_locale(de->d_name); if (!z) return -ENOMEM; |