libxlMakeDomainDeviceGraphicsCaps() returns nothing except 0. Changing
return type to void.
Found by Linux Verification Center (
linuxtesting.org) with SVACE.
Signed-off-by: Dmitry Frolov <frolov(a)swemel.ru>
---
src/libxl/libxl_capabilities.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/src/libxl/libxl_capabilities.c b/src/libxl/libxl_capabilities.c
index bb37e5cae2..bef219a62d 100644
--- a/src/libxl/libxl_capabilities.c
+++ b/src/libxl/libxl_capabilities.c
@@ -559,7 +559,7 @@ libxlMakeDomainDeviceDiskCaps(virDomainCapsDeviceDisk *dev)
VIR_DOMAIN_DISK_BUS_XEN);
}
-static int
+static void
libxlMakeDomainDeviceGraphicsCaps(virDomainCapsDeviceGraphics *dev)
{
dev->supported = VIR_TRISTATE_BOOL_YES;
@@ -569,8 +569,6 @@ libxlMakeDomainDeviceGraphicsCaps(virDomainCapsDeviceGraphics *dev)
VIR_DOMAIN_GRAPHICS_TYPE_SDL,
VIR_DOMAIN_GRAPHICS_TYPE_VNC,
VIR_DOMAIN_GRAPHICS_TYPE_SPICE);
-
- return 0;
}
static int
@@ -673,8 +671,8 @@ libxlMakeDomainCapabilities(virDomainCaps *domCaps,
libxlMakeDomainOSCaps(domCaps->machine, os, firmwares, nfirmwares);
libxlMakeDomainDeviceDiskCaps(disk);
- if (libxlMakeDomainDeviceGraphicsCaps(graphics) < 0 ||
- libxlMakeDomainDeviceVideoCaps(video) < 0)
+ libxlMakeDomainDeviceGraphicsCaps(graphics);
+ if (libxlMakeDomainDeviceVideoCaps(video) < 0)
return -1;
if (STRNEQ(domCaps->machine, "xenpvh") &&
libxlMakeDomainDeviceHostdevCaps(hostdev) < 0)
--
2.34.1