From: Yu Watanabe Date: Mon, 21 Jun 2021 11:19:26 +0000 (+0900) Subject: mount-util: reduce scope of variable X-Git-Tag: v249-rc2~33^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=25086b4c174e47f3d21adc9022a579eccf5ab65f;p=thirdparty%2Fsystemd.git mount-util: reduce scope of variable --- diff --git a/src/shared/mount-util.c b/src/shared/mount-util.c index f73527a9d4e..4a8564d5605 100644 --- a/src/shared/mount-util.c +++ b/src/shared/mount-util.c @@ -651,7 +651,6 @@ int mount_option_mangle( const struct libmnt_optmap *map; _cleanup_free_ char *ret = NULL; - const char *p; int r; /* This extracts mount flags from the mount options, and store @@ -676,8 +675,7 @@ int mount_option_mangle( if (!map) return -EINVAL; - p = options; - for (;;) { + for (const char *p = options;;) { _cleanup_free_ char *word = NULL; const struct libmnt_optmap *ent;