1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-07 17:28:15 +00:00

lxc: report correct error

Clang noticed a dead assignment, which turned out to be the use
of the wrong variable.  rc starts life as -1, and is only ever
assigned to 0 just before a successful cleanup.

* src/lxc/lxc_driver.c (lxcSetupInterfaces): Don't call
virReportSystemError(-1).
This commit is contained in:
Eric Blake 2011-05-03 14:30:34 -06:00
parent 710f8811f5
commit 32388f12d5

View File

@ -1100,10 +1100,9 @@ static int lxcSetupInterfaces(virConnectPtr conn,
}
if ((ret = brAddInterface(brctl, bridge, parentVeth)) != 0) {
virReportSystemError(rc,
virReportSystemError(ret,
_("Failed to add %s device to %s"),
parentVeth, bridge);
rc = -1;
goto error_exit;
}