[PATCH 29/30] util: remove cleanup labels

Ryan Gahagan rgahagan at cs.utexas.edu
Mon Nov 23 22:09:50 UTC 2020


From: Barrett Schonefeld <bschoney at utexas.edu>

- src/util/virlog.c

Signed-off-by: Barrett Schonefeld <bschoney at utexas.edu>
---
 src/util/virlog.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/util/virlog.c b/src/util/virlog.c
index e12fd58831..2bf606b8c5 100644
--- a/src/util/virlog.c
+++ b/src/util/virlog.c
@@ -528,7 +528,8 @@ virLogVMessage(virLogSourcePtr source,
     if (source->serial < virLogFiltersSerial)
         virLogSourceUpdate(source);
     if (priority < source->priority)
-        goto cleanup;
+        errno = saved_errno;
+        return;
 
     /*
      * serialize the error message, add level and timestamp
@@ -601,8 +602,6 @@ virLogVMessage(virLogSourcePtr source,
                          str, msg, (void *) STDERR_FILENO);
     }
     virLogUnlock();
- cleanup:
-    errno = saved_errno;
 }
 
 
-- 
2.29.0




More information about the libvir-list mailing list