From 25086b4c174e47f3d21adc9022a579eccf5ab65f Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Mon, 21 Jun 2021 20:19:26 +0900 Subject: [PATCH] mount-util: reduce scope of variable --- src/shared/mount-util.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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; -- 2.47.3