[CRIU] [PATCH] sysct: typo fix to '~' rather than '!'

Andrey Vagin avagin at openvz.org
Mon Oct 5 06:02:37 PDT 2015


From: Andrew Vagin <avagin at openvz.org>

CID 152109 (#1 of 1): Logical vs. bitwise operator (CONSTANT_EXPRESSION_RESULT)

Signed-off-by: Andrew Vagin <avagin at openvz.org>
---
 sysctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sysctl.c b/sysctl.c
index 270d974..f68dbe5 100644
--- a/sysctl.c
+++ b/sysctl.c
@@ -389,7 +389,7 @@ int sysctl_op(struct sysctl_req *req, size_t nr_req, int op, unsigned int ns)
 	if (nr_req == 0)
 		return 0;
 
-	if (ns & !KNOWN_NS_MASK) {
+	if (ns & ~KNOWN_NS_MASK) {
 		pr_err("don't know how to restore some namespaces in %u\n", ns);
 		return -1;
 	}
-- 
2.4.3



More information about the CRIU mailing list