Commit id '692e9fac7' 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 pass as a size_t to avoid the noise.
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
src/lxc/lxc_container.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c
index a433552..062da68 100644
--- a/src/lxc/lxc_container.c
+++ b/src/lxc/lxc_container.c
@@ -2150,8 +2150,8 @@ static int lxcContainerDropCapabilities(virDomainDefPtr def
ATTRIBUTE_UNUSED,
*/
static int lxcAttachNS(int *ns_fd)
{
- if (ns_fd &&
- virProcessSetNamespaces(VIR_LXC_DOMAIN_NAMESPACE_LAST, ns_fd) < 0)
+ size_t nfdlist = VIR_LXC_DOMAIN_NAMESPACE_LAST;
+ if (ns_fd && virProcessSetNamespaces(nfdlist, ns_fd) < 0)
return -1;
return 0;
}
--
2.1.0