From: Ryan Moeller Date: Sat, 22 Feb 2020 06:38:44 +0000 (-0500) Subject: bhyve: monitor: eliminate rc variable X-Git-Tag: v6.1.0-rc1~71 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=501db47d9d3bc922ca4301f92fcf65db13ab39c6;p=thirdparty%2Flibvirt.git bhyve: monitor: eliminate rc variable Signed-off-by: Ryan Moeller Signed-off-by: Ján Tomko Reviewed-by: Ján Tomko --- diff --git a/src/bhyve/bhyve_monitor.c b/src/bhyve/bhyve_monitor.c index b9ad4520d9..0e55e19772 100644 --- a/src/bhyve/bhyve_monitor.c +++ b/src/bhyve/bhyve_monitor.c @@ -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;