[CRIU] [PATCH 1/5] mount: Simplify ext_mount_parse_auto
Radostin Stoyanov
rstoyanov1 at gmail.com
Wed Aug 22 22:54:29 MSK 2018
There are no functional changes.
Signed-off-by: Radostin Stoyanov <rstoyanov1 at gmail.com>
---
criu/mount.c | 18 +++++++-----------
1 file changed, 7 insertions(+), 11 deletions(-)
diff --git a/criu/mount.c b/criu/mount.c
index 62e012ec..078654f6 100644
--- a/criu/mount.c
+++ b/criu/mount.c
@@ -77,17 +77,13 @@ int ext_mount_parse_auto(char *key)
opts.autodetect_ext_mounts = true;
if (*key == ':') {
- while (1) {
- key++;
- if (*key == '\0')
- break;
- else if (*key == 'm')
- opts.enable_external_masters = true;
- else if (*key == 's')
- opts.enable_external_sharing = true;
- else
- return -1;
- }
+ key++;
+ if (*key == 'm')
+ opts.enable_external_masters = true;
+ else if (*key == 's')
+ opts.enable_external_sharing = true;
+ else if (*key != '\0')
+ return -1;
}
return 0;
--
2.17.1
More information about the CRIU
mailing list