[PATCH 05/16] Eliminate rc variable

Ryan Moeller posted 16 patches 4 years, 9 months ago
There is a newer version of this series
[PATCH 05/16] Eliminate rc variable
Posted by Ryan Moeller 4 years, 9 months ago
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
---
 src/bhyve/bhyve_monitor.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

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;
-- 
2.24.1


Re: [PATCH 05/16] Eliminate rc variable
Posted by Ján Tomko 4 years, 9 months ago
On Sat, Feb 22, 2020 at 01:38:44AM -0500, Ryan Moeller wrote:
>Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
>---
> src/bhyve/bhyve_monitor.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>

Reviewed-by: Ján Tomko <jtomko@redhat.com>

Jano