summaryrefslogtreecommitdiffstats
path: root/src/userdb
diff options
context:
space:
mode:
authorMatteo Croce <teknoraver@meta.com>2024-04-18 14:31:39 +0200
committerMatteo Croce <teknoraver@meta.com>2024-04-18 17:39:34 +0200
commit854711645b2b7801bd9a0123f3067dcc052f2557 (patch)
tree47b6afe3a6e58dc5c9625d52477a7f9e94888c1b /src/userdb
parentintroduce FOREACH_ELEMENT (diff)
downloadsystemd-854711645b2b7801bd9a0123f3067dcc052f2557.tar.xz
systemd-854711645b2b7801bd9a0123f3067dcc052f2557.zip
use FOREACH_ELEMENT
Use FOREACH_ELEMENT where possible. Generated with this command, and checked manually: git grep -l 'FOREACH_ARRAY.*ELEMENTSOF' | \ xargs sed -ri 's/FOREACH_ARRAY\((.*), (.*), (ELEMENTSOF.*)\)/FOREACH_ELEMENT(\1, \2)/'
Diffstat (limited to 'src/userdb')
-rw-r--r--src/userdb/userdbctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/userdb/userdbctl.c b/src/userdb/userdbctl.c
index 918b4d772f..1718419407 100644
--- a/src/userdb/userdbctl.c
+++ b/src/userdb/userdbctl.c
@@ -174,7 +174,7 @@ static int table_add_uid_boundaries(Table *table, const UIDRange *p) {
assert(table);
- FOREACH_ARRAY(i, uid_range_table, ELEMENTSOF(uid_range_table)) {
+ FOREACH_ELEMENT(i, uid_range_table) {
_cleanup_free_ char *name = NULL, *comment = NULL;
if (!uid_range_covers(p, i->first, i->last - i->first + 1))
@@ -532,7 +532,7 @@ static int table_add_gid_boundaries(Table *table, const UIDRange *p) {
assert(table);
- FOREACH_ARRAY(i, uid_range_table, ELEMENTSOF(uid_range_table)) {
+ FOREACH_ELEMENT(i, uid_range_table) {
_cleanup_free_ char *name = NULL, *comment = NULL;
if (!uid_range_covers(p, i->first, i->last - i->first + 1))