]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
mount-util: reduce scope of variable
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 21 Jun 2021 11:19:26 +0000 (20:19 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 21 Jun 2021 12:34:10 +0000 (21:34 +0900)
src/shared/mount-util.c

index f73527a9d4e999dfe1376d182bc5eb6850d1a970..4a8564d560535f3331133313f505cc60f37fe0d0 100644 (file)
@@ -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;