[CRIU] [PATCH] crtools: Don't use global variable if it's passed as
argument already
Cyrill Gorcunov
gorcunov at openvz.org
Wed Feb 1 03:52:00 EST 2012
parse_ns_string is called as parse_ns_string(optarg, &opts.namespaces_flags)
so no need to poke opts.namespaces_flags explicitly.
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
crtools.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/crtools.c b/crtools.c
index 989f9a9..70696c6 100644
--- a/crtools.c
+++ b/crtools.c
@@ -267,9 +267,9 @@ static int parse_ns_string(const char *ptr, unsigned int *flags)
if (ptr[3] != ',' && ptr[3] != '\0')
goto bad_ns;
if (!strncmp(ptr, "uts", 3))
- opts.namespaces_flags |= CLONE_NEWUTS;
+ *flags |= CLONE_NEWUTS;
else if (!strncmp(ptr, "ipc", 3))
- opts.namespaces_flags |= CLONE_NEWIPC;
+ *flags |= CLONE_NEWIPC;
else
goto bad_ns;
ptr += 4;
--
1.7.7.6
More information about the CRIU
mailing list