mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 23:37:42 +00:00
bhyve: monitor: eliminate rc variable
Signed-off-by: Ryan Moeller <ryan@iXsystems.com> Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
a11a6b7cd4
commit
501db47d9d
@ -130,7 +130,6 @@ bhyveMonitorOpen(virDomainObjPtr vm, bhyveConnPtr driver)
|
|||||||
{
|
{
|
||||||
bhyveMonitorPtr mon = NULL;
|
bhyveMonitorPtr mon = NULL;
|
||||||
struct kevent kev;
|
struct kevent kev;
|
||||||
int rc;
|
|
||||||
|
|
||||||
if (VIR_ALLOC(mon) < 0)
|
if (VIR_ALLOC(mon) < 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -145,8 +144,7 @@ bhyveMonitorOpen(virDomainObjPtr vm, bhyveConnPtr driver)
|
|||||||
}
|
}
|
||||||
|
|
||||||
EV_SET(&kev, vm->pid, EVFILT_PROC, EV_ADD, NOTE_EXIT, 0, mon);
|
EV_SET(&kev, vm->pid, EVFILT_PROC, EV_ADD, NOTE_EXIT, 0, mon);
|
||||||
rc = kevent(mon->kq, &kev, 1, NULL, 0, NULL);
|
if (kevent(mon->kq, &kev, 1, NULL, 0, NULL) < 0) {
|
||||||
if (rc < 0) {
|
|
||||||
virReportError(VIR_ERR_SYSTEM_ERROR, "%s",
|
virReportError(VIR_ERR_SYSTEM_ERROR, "%s",
|
||||||
_("Unable to register process kevent"));
|
_("Unable to register process kevent"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user