virDomainGraphicsListenAppendAddress() always returns 0.
Signed-off-by: Dmitry Frolov <frolov(a)swemel.ru>
---
src/conf/domain_conf.c | 4 +---
src/conf/domain_conf.h | 4 ++--
src/libxl/xen_common.c | 7 ++-----
src/libxl/xen_xl.c | 3 +--
src/vbox/vbox_common.c | 4 +---
src/vmx/vmx.c | 3 +--
6 files changed, 8 insertions(+), 17 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 22ad43e1d7..7b4d86d837 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -29053,7 +29053,7 @@ virDomainGraphicsGetListen(virDomainGraphicsDef *def, size_t i)
}
-int
+void
virDomainGraphicsListenAppendAddress(virDomainGraphicsDef *def,
const char *address)
{
@@ -29064,8 +29064,6 @@ virDomainGraphicsListenAppendAddress(virDomainGraphicsDef *def,
glisten.address = g_strdup(address);
VIR_APPEND_ELEMENT_COPY(def->listens, def->nListens, glisten);
-
- return 0;
}
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index ed07859bc5..1ee33b90a2 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -3909,8 +3909,8 @@ int virDomainHostdevMatch(virDomainHostdevDef *a,
virDomainGraphicsListenDef *
virDomainGraphicsGetListen(virDomainGraphicsDef *def, size_t i);
-int virDomainGraphicsListenAppendAddress(virDomainGraphicsDef *def,
- const char *address)
+void virDomainGraphicsListenAppendAddress(virDomainGraphicsDef *def,
+ const char *address)
ATTRIBUTE_NONNULL(1);
int virDomainGraphicsListenAppendSocket(virDomainGraphicsDef *def,
const char *socket)
diff --git a/src/libxl/xen_common.c b/src/libxl/xen_common.c
index d5a0399613..c7bc51b926 100644
--- a/src/libxl/xen_common.c
+++ b/src/libxl/xen_common.c
@@ -673,8 +673,7 @@ xenParseVfb(virConf *conf, virDomainDef *def)
if (xenConfigCopyStringOpt(conf, "vnclisten", &listenAddr) <
0)
goto cleanup;
- if (virDomainGraphicsListenAppendAddress(graphics, listenAddr) < 0)
- goto cleanup;
+ virDomainGraphicsListenAppendAddress(graphics, listenAddr);
VIR_FREE(listenAddr);
if (xenConfigCopyStringOpt(conf, "vncpasswd",
&graphics->data.vnc.auth.passwd) < 0)
@@ -766,9 +765,7 @@ xenParseVfb(virConf *conf, virDomainDef *def)
key = nextkey;
}
if (graphics->type == VIR_DOMAIN_GRAPHICS_TYPE_VNC) {
- if (virDomainGraphicsListenAppendAddress(graphics,
- listenAddr) < 0)
- goto cleanup;
+ virDomainGraphicsListenAppendAddress(graphics, listenAddr);
VIR_FREE(listenAddr);
}
def->graphics = g_new0(virDomainGraphicsDef *, 1);
diff --git a/src/libxl/xen_xl.c b/src/libxl/xen_xl.c
index f175359307..553aa77896 100644
--- a/src/libxl/xen_xl.c
+++ b/src/libxl/xen_xl.c
@@ -341,8 +341,7 @@ xenParseXLSpice(virConf *conf, virDomainDef *def)
graphics->type = VIR_DOMAIN_GRAPHICS_TYPE_SPICE;
if (xenConfigCopyStringOpt(conf, "spicehost", &listenAddr) <
0)
goto cleanup;
- if (virDomainGraphicsListenAppendAddress(graphics, listenAddr) < 0)
- goto cleanup;
+ virDomainGraphicsListenAppendAddress(graphics, listenAddr);
if (xenConfigGetULong(conf, "spicetls_port", &port, 0) < 0)
goto cleanup;
diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c
index de3c9989a5..9f6612ad61 100644
--- a/src/vbox/vbox_common.c
+++ b/src/vbox/vbox_common.c
@@ -3625,8 +3625,7 @@ vboxDumpDisplay(virDomainDef *def, struct _vboxDriver *data,
IMachine *machine)
if (netAddressUtf8 && STREQ(netAddressUtf8, ""))
VBOX_UTF8_FREE(netAddressUtf8);
- if (virDomainGraphicsListenAppendAddress(graphics, netAddressUtf8) < 0)
- goto cleanup;
+ virDomainGraphicsListenAppendAddress(graphics, netAddressUtf8);
gVBoxAPI.UIVRDEServer.GetAllowMultiConnection(VRDEServer,
&allowMultiConnection);
if (allowMultiConnection)
@@ -3641,7 +3640,6 @@ vboxDumpDisplay(virDomainDef *def, struct _vboxDriver *data,
IMachine *machine)
ret = 0;
- cleanup:
VBOX_RELEASE(VRDEServer);
VBOX_UTF8_FREE(valueTypeUtf8);
VBOX_UTF8_FREE(netAddressUtf8);
diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c
index 26b89776e1..e746ff213b 100644
--- a/src/vmx/vmx.c
+++ b/src/vmx/vmx.c
@@ -2017,8 +2017,7 @@ virVMXParseVNC(virConf *conf, virDomainGraphicsDef **def)
goto failure;
}
- if (virDomainGraphicsListenAppendAddress(*def, listenAddr) < 0)
- goto failure;
+ virDomainGraphicsListenAppendAddress(*def, listenAddr);
VIR_FREE(listenAddr);
if (port < 0) {
--
2.34.1