libxlCapsAddCPUID() always returns 0.
Signed-off-by: Dmitry Frolov <frolov(a)swemel.ru>
---
src/libxl/libxl_capabilities.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/src/libxl/libxl_capabilities.c b/src/libxl/libxl_capabilities.c
index 9da0fe851c..9be64a53a8 100644
--- a/src/libxl/libxl_capabilities.c
+++ b/src/libxl/libxl_capabilities.c
@@ -55,7 +55,7 @@ struct guest_arch {
#define XEN_CAP_REGEX
"(xen|hvm)-[[:digit:]]+\\.[[:digit:]]+-(aarch64|armv7l|x86_32|x86_64|ia64|powerpc64)(p|be)?"
-static int
+static void
libxlCapsAddCPUID(virCPUData *data, virCPUx86CPUID *cpuid, ssize_t ncaps)
{
virCPUx86DataItem item = { 0 };
@@ -66,8 +66,6 @@ libxlCapsAddCPUID(virCPUData *data, virCPUx86CPUID *cpuid, ssize_t
ncaps)
item.data.cpuid = cpuid[i];
virCPUx86DataAdd(data, &item);
}
-
- return 0;
}
/*
@@ -114,8 +112,7 @@ libxlCapsNodeData(virCPUDef *cpu, libxl_hwcap hwcap)
return NULL;
ncaps = G_N_ELEMENTS(cpuid);
- if (libxlCapsAddCPUID(cpudata, cpuid, ncaps) < 0)
- return NULL;
+ libxlCapsAddCPUID(cpudata, cpuid, ncaps);
return g_steal_pointer(&cpudata);
}
--
2.34.1