The callers expect '1' on a successful probe,
so return 1 just like VIR_STRDUP would.
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
if (bhyve_driver == NULL)
return 0;
- return VIR_STRDUP(*uri, "bhyve:///system");
+ *uri = g_strdup("bhyve:///system");
+ return 1;
}
if (libxl_driver == NULL)
return 0;
- return VIR_STRDUP(*uri, "xen:///system");
+ *uri = g_strdup("xen:///system");
+ return 1;
}
if (lxc_driver == NULL)
return 0;
- return VIR_STRDUP(*uri, "lxc:///system");
+ *uri = g_strdup("lxc:///system");
+ return 1;
}
if (access("/proc/vz", W_OK) < 0)
return 0;
- return VIR_STRDUP(*uri, "openvz:///system");
+ *uri = g_strdup("openvz:///system");
+ return 1;
}
static int
vboxConnectURIProbe(char **uri)
{
- return VIR_STRDUP(*uri, geteuid() ? "vbox:///session" : "vbox:///system");
+ *uri = g_strdup(geteuid() ? "vbox:///session" : "vbox:///system");
+ return 1;
}