提交 32388f12 编写于 作者: E Eric Blake

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).
上级 710f8811
...@@ -1100,10 +1100,9 @@ static int lxcSetupInterfaces(virConnectPtr conn, ...@@ -1100,10 +1100,9 @@ static int lxcSetupInterfaces(virConnectPtr conn,
} }
if ((ret = brAddInterface(brctl, bridge, parentVeth)) != 0) { if ((ret = brAddInterface(brctl, bridge, parentVeth)) != 0) {
virReportSystemError(rc, virReportSystemError(ret,
_("Failed to add %s device to %s"), _("Failed to add %s device to %s"),
parentVeth, bridge); parentVeth, bridge);
rc = -1;
goto error_exit; goto error_exit;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册