提交 11822fff 编写于 作者: J John Ferlan

lxc: Avoid Coverity SIZEOF_MISMATCH

Commit id '692e9fac' used virProcessSetNamespaces instead of inlining
the similar functionality; however, Coverity notes that the function
prototype expects a size_t value and not an enum and complains. So,
just typecast the enum as a size_t to avoid the noise.
上级 ea3c5f25
/* /*
* Copyright (C) 2008-2014 Red Hat, Inc. * Copyright (C) 2008-2015 Red Hat, Inc.
* Copyright (C) 2008 IBM Corp. * Copyright (C) 2008 IBM Corp.
* Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. * Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
* *
...@@ -2151,7 +2151,8 @@ static int lxcContainerDropCapabilities(virDomainDefPtr def ATTRIBUTE_UNUSED, ...@@ -2151,7 +2151,8 @@ static int lxcContainerDropCapabilities(virDomainDefPtr def ATTRIBUTE_UNUSED,
static int lxcAttachNS(int *ns_fd) static int lxcAttachNS(int *ns_fd)
{ {
if (ns_fd && if (ns_fd &&
virProcessSetNamespaces(VIR_LXC_DOMAIN_NAMESPACE_LAST, ns_fd) < 0) virProcessSetNamespaces((size_t)VIR_LXC_DOMAIN_NAMESPACE_LAST,
ns_fd) < 0)
return -1; return -1;
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册