From: Eric Blake Date: Tue, 3 May 2011 20:30:34 +0000 (-0600) Subject: lxc: report correct error X-Git-Tag: v0.9.1~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=32388f12d57cd827c2f87eafcf512c3ff63b7bbb;p=thirdparty%2Flibvirt.git 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). --- diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c index e90530284c..b94941d653 100644 --- a/src/lxc/lxc_driver.c +++ b/src/lxc/lxc_driver.c @@ -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; }