The virCapabilitiesGetNodeInfo() function has the usual return value semantics for integeres: a negative value means an error, zero or a positive value means success. However, the function call done in virCPUProbeHost() doesn't check for the return value accordingly. Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx> --- src/cpu/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cpu/cpu.c b/src/cpu/cpu.c index d9288cc85a..ae3a0acc10 100644 --- a/src/cpu/cpu.c +++ b/src/cpu/cpu.c @@ -456,7 +456,7 @@ virCPUProbeHost(virArch arch) { virNodeInfo nodeinfo; - if (virCapabilitiesGetNodeInfo(&nodeinfo)) + if (virCapabilitiesGetNodeInfo(&nodeinfo) < 0) return NULL; return virCPUGetHost(arch, VIR_CPU_TYPE_HOST, &nodeinfo, NULL); -- 2.24.1