mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 06:35:24 +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;
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user