[PATCH 29/30] util: remove cleanup labels
Ján Tomko
jtomko at redhat.com
Tue Nov 24 12:37:44 UTC 2020
On a Monday in 2020, Ryan Gahagan wrote:
>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;
This code is also executed for code paths that fall through
the cleanup label, it cannot be removed.
> }
>
>
>--
>2.29.0
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20201124/9c79500e/attachment-0001.sig>
More information about the libvir-list
mailing list