hyperv needs a server to connect to, so use this macro in order to reuse code. Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@xxxxxxxxx> --- src/hyperv/hyperv_driver.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/hyperv/hyperv_driver.c b/src/hyperv/hyperv_driver.c index 95496bdf73..a419f0ccee 100644 --- a/src/hyperv/hyperv_driver.c +++ b/src/hyperv/hyperv_driver.c @@ -128,12 +128,7 @@ hypervConnectOpen(virConnectPtr conn, virConnectAuthPtr auth, virCheckFlags(VIR_CONNECT_RO, VIR_DRV_OPEN_ERROR); - /* Require server part */ - if (conn->uri->server == NULL) { - virReportError(VIR_ERR_INVALID_ARG, "%s", - _("URI is missing the server part")); - return VIR_DRV_OPEN_ERROR; - } + VIR_DRV_CONN_CHECK_SERVER; /* Require auth */ if (auth == NULL || auth->cb == NULL) { -- 2.17.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list