From: Lennart Poettering Date: Wed, 24 Aug 2022 09:16:55 +0000 (+0200) Subject: umount: minor modernizations X-Git-Tag: v252-rc1~246^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c905aaf68607754a2aa131854544f5b44a378874;p=thirdparty%2Fsystemd.git umount: minor modernizations --- diff --git a/src/shutdown/umount.c b/src/shutdown/umount.c index 6d133d57619..2fd1b464e45 100644 --- a/src/shutdown/umount.c +++ b/src/shutdown/umount.c @@ -76,16 +76,15 @@ int mount_points_list_get(const char *mountinfo, MountPoint **head) { return log_error_errno(r, "Failed to parse %s: %m", mountinfo ?: "/proc/self/mountinfo"); for (;;) { + _cleanup_free_ char *options = NULL, *remount_options = NULL; struct libmnt_fs *fs; const char *path, *fstype; - _cleanup_free_ char *options = NULL; unsigned long remount_flags = 0u; - _cleanup_free_ char *remount_options = NULL; bool try_remount_ro; _cleanup_free_ MountPoint *m = NULL; r = mnt_table_next_fs(table, iter, &fs); - if (r == 1) + if (r == 1) /* EOF */ break; if (r < 0) return log_error_errno(r, "Failed to get next entry from %s: %m", mountinfo ?: "/proc/self/mountinfo"); @@ -197,7 +196,7 @@ int swap_list_get(const char *swaps, MountPoint **head) { const char *source; r = mnt_table_next_fs(t, i, &fs); - if (r == 1) + if (r == 1) /* EOF */ break; if (r < 0) return log_error_errno(r, "Failed to get next entry from %s: %m", swaps ?: "/proc/swaps");