[lxc-devel] [lxc/master] start: do not init ns_clone_flags to -1

brauner on Github lxc-bot at linuxcontainers.org
Mon May 28 11:28:33 UTC 2018


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 443 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20180528/c266d907/attachment.bin>
-------------- next part --------------
From f3815517f22d39fbd3458f8559467c947b1e291b Mon Sep 17 00:00:00 2001
From: Christian Brauner <christian.brauner at ubuntu.com>
Date: Mon, 28 May 2018 13:27:43 +0200
Subject: [PATCH] start: do not init ns_clone_flags to -1

ns_clone_flags is used as a bitmask so initializing it to -1 is a bad idea.

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>
---
 src/lxc/start.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/lxc/start.c b/src/lxc/start.c
index 048b97b4f..7ec151e1c 100644
--- a/src/lxc/start.c
+++ b/src/lxc/start.c
@@ -619,8 +619,6 @@ void lxc_zero_handler(struct lxc_handler *handler)
 
 	memset(handler, 0, sizeof(struct lxc_handler));
 
-	handler->ns_clone_flags = -1;
-
 	handler->pinfd = -1;
 
 	handler->sigfd = -1;


More information about the lxc-devel mailing list