]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/core/mount-setup.c
mount-setup: use FOREACH_STRING where appropriate
[thirdparty/systemd.git] / src / core / mount-setup.c
index e773e17e1c478f0c91473b16dffffa47977ba6ba..231c7d800192844a8e056a51cb75b0eb44b1edfe 100644 (file)
@@ -517,13 +517,13 @@ int mount_setup(bool loaded_policy) {
         if (loaded_policy) {
                 usec_t before_relabel, after_relabel;
                 char timespan[FORMAT_TIMESPAN_MAX];
+                const char *i;
                 int n_extra;
 
                 before_relabel = now(CLOCK_MONOTONIC);
 
-                (void) nftw("/dev", nftw_cb, 64, FTW_MOUNT|FTW_PHYS|FTW_ACTIONRETVAL);
-                (void) nftw("/dev/shm", nftw_cb, 64, FTW_MOUNT|FTW_PHYS|FTW_ACTIONRETVAL);
-                (void) nftw("/run", nftw_cb, 64, FTW_MOUNT|FTW_PHYS|FTW_ACTIONRETVAL);
+                FOREACH_STRING(i, "/dev", "/dev/shm", "/run")
+                        (void) nftw(i, nftw_cb, 64, FTW_MOUNT|FTW_PHYS|FTW_ACTIONRETVAL);
 
                 r = relabel_cgroup_filesystems();
                 if (r < 0)