unsigned long includeVersion;
unsigned long apiVersion;
unsigned long daemonVersion;
- int ret;
unsigned int major;
unsigned int minor;
unsigned int rel;
vshPrint(ctl, _("Compiled against library: libvirt %d.%d.%d\n"),
major, minor, rel);
- ret = virGetVersion(&libVersion, hvType, &apiVersion);
- if (ret < 0) {
+ if (virGetVersion(&libVersion, hvType, &apiVersion) < 0) {
vshError(ctl, "%s", _("failed to get the library version"));
return false;
}
vshPrint(ctl, _("Using API: %s %d.%d.%d\n"), hvType,
major, minor, rel);
- ret = virConnectGetVersion(priv->conn, &hvVersion);
- if (ret < 0) {
+ if (virConnectGetVersion(priv->conn, &hvVersion) < 0) {
vshError(ctl, "%s", _("failed to get the hypervisor version"));
return false;
}
}
if (vshCommandOptBool(cmd, "daemon")) {
- ret = virConnectGetLibVersion(priv->conn, &daemonVersion);
- if (ret < 0) {
+ if (virConnectGetLibVersion(priv->conn, &daemonVersion) < 0) {
vshError(ctl, "%s", _("failed to get the daemon version"));
} else {
major = daemonVersion / 1000000;