提交 501db47d 编写于 作者: R Ryan Moeller 提交者: Ján Tomko

bhyve: monitor: eliminate rc variable

Signed-off-by: NRyan Moeller <ryan@iXsystems.com>
Signed-off-by: NJán Tomko <jtomko@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 a11a6b7c
......@@ -130,7 +130,6 @@ bhyveMonitorOpen(virDomainObjPtr vm, bhyveConnPtr driver)
{
bhyveMonitorPtr mon = NULL;
struct kevent kev;
int rc;
if (VIR_ALLOC(mon) < 0)
return NULL;
......@@ -145,8 +144,7 @@ bhyveMonitorOpen(virDomainObjPtr vm, bhyveConnPtr driver)
}
EV_SET(&kev, vm->pid, EVFILT_PROC, EV_ADD, NOTE_EXIT, 0, mon);
rc = kevent(mon->kq, &kev, 1, NULL, 0, NULL);
if (rc < 0) {
if (kevent(mon->kq, &kev, 1, NULL, 0, NULL) < 0) {
virReportError(VIR_ERR_SYSTEM_ERROR, "%s",
_("Unable to register process kevent"));
goto cleanup;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册