diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-03-15 16:14:53 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-03-19 08:10:29 +0900 |
commit | 03677889f0ef42cdc534bf3b31265a054b20a354 (patch) | |
tree | 53caa0977a8afc5d0ee90e038ffd566e9e22451f /src/shutdown | |
parent | 40f35786b0030f1f7c4b88828776ada1dd74d03e (diff) | |
download | systemd-03677889f0ef42cdc534bf3b31265a054b20a354.tar.gz |
list: declare iterator of LIST_FOREACH() in the loop
Diffstat (limited to 'src/shutdown')
-rw-r--r-- | src/shutdown/test-umount.c | 2 | ||||
-rw-r--r-- | src/shutdown/umount.c | 5 |
2 files changed, 0 insertions, 7 deletions
diff --git a/src/shutdown/test-umount.c b/src/shutdown/test-umount.c index 56fcff05b1..c92105b62b 100644 --- a/src/shutdown/test-umount.c +++ b/src/shutdown/test-umount.c @@ -12,7 +12,6 @@ static void test_mount_points_list_one(const char *fname) { _cleanup_(mount_points_list_free) LIST_HEAD(MountPoint, mp_list_head); _cleanup_free_ char *testdata_fname = NULL; - MountPoint *m; log_info("/* %s(\"%s\") */", __func__, fname ?: "/proc/self/mountinfo"); @@ -43,7 +42,6 @@ TEST(mount_points_list) { static void test_swap_list_one(const char *fname) { _cleanup_(mount_points_list_free) LIST_HEAD(MountPoint, mp_list_head); _cleanup_free_ char *testdata_fname = NULL; - MountPoint *m; int r; log_info("/* %s(\"%s\") */", __func__, fname ?: "/proc/swaps"); diff --git a/src/shutdown/umount.c b/src/shutdown/umount.c index ed45ea9edb..4f14dfb3df 100644 --- a/src/shutdown/umount.c +++ b/src/shutdown/umount.c @@ -589,7 +589,6 @@ static int umount_with_timeout(MountPoint *m, int umount_log_level) { /* This includes remounting readonly, which changes the kernel mount options. Therefore the list passed to * this function is invalidated, and should not be reused. */ static int mount_points_list_umount(MountPoint **head, bool *changed, int umount_log_level) { - MountPoint *m; int n_failed = 0; assert(head); @@ -635,7 +634,6 @@ static int mount_points_list_umount(MountPoint **head, bool *changed, int umount } static int swap_points_list_off(MountPoint **head, bool *changed) { - MountPoint *m, *n; int n_failed = 0; assert(head); @@ -657,7 +655,6 @@ static int swap_points_list_off(MountPoint **head, bool *changed) { } static int loopback_points_list_detach(MountPoint **head, bool *changed, int umount_log_level) { - MountPoint *m, *n; int n_failed = 0, r; dev_t rootdev = 0; @@ -689,7 +686,6 @@ static int loopback_points_list_detach(MountPoint **head, bool *changed, int umo } static int dm_points_list_detach(MountPoint **head, bool *changed, int umount_log_level) { - MountPoint *m, *n; int n_failed = 0, r; dev_t rootdev = 0; @@ -720,7 +716,6 @@ static int dm_points_list_detach(MountPoint **head, bool *changed, int umount_lo } static int md_points_list_detach(MountPoint **head, bool *changed, int umount_log_level) { - MountPoint *m, *n; int n_failed = 0, r; dev_t rootdev = 0; |